ginuerzh / gost

GO Simple Tunnel - a simple tunnel written in golang
MIT License
15.84k stars 2.47k forks source link

UDP 透明代理,转发后数据包前面加了7个字节?? #738

Open swing99527 opened 3 years ago

swing99527 commented 3 years ago

命令:./gost-linux-armv8-2.11.1 -L redu://:1090?ttl=60s -F ssu://123.57.201.195:5060 -D

# iptables -vL -t mangle Chain PREROUTING (policy ACCEPT 926K packets, 1157M bytes) pkts bytes target prot opt in out source destination
0 0 RETURN udp -- any any anywhere anywhere udp spt:1090 732 300K TPROXY udp -- any any 192.168.2.202 anywhere udp dpt:sip TPROXY redirect 0.0.0.0:1090 mark 0x1/0x1 # ip rule list table 100 100: from all fwmark 0x2333/0x2333 lookup 100 32765: from all fwmark 0x1 lookup 100

0000 a8 2b cd 9a bd 11 ba 46 1d ef e3 09 08 00 45 00 .+.....F......E. 0010 01 9e ff b9 40 00 40 11 30 13 c0 a8 03 dd 7b 39 ....@.@.0.....{9 0020 c9 c3 b9 1e 13 c4 01 8a 0b 1e 01 7b 39 c9 c3 13 ...........{9... 0030 c4 52 45 47 49 53 54 45 52 20 73 69 70 3a 34 34 .REGISTER sip:44 0040 30 31 30 32 30 30 34 39 32 30 30 30 30 30 30 30 0102004920000000 0050 30 31 40 31 32 33 2e 35 37 2e 32 30 31 2e 31 39 01@123.57.201.19 0060 35 3a 35 30 36 30 20 53 49 50 2f 32 2e 30 0d 0a 5:5060 SIP/2.0.. 0070 56 69 61 3a 20 53 49 50 2f 32 2e 30 2f 55 44 50 Via: SIP/2.0/UDP 0080 20 31 39 32 2e 31 36 38 2e 32 2e 32 30 32 3a 37 192.168.2.202:7 0090 31 30 30 3b 72 70 6f 72 74 3b 62 72 61 6e 63 68 100;rport;branch 00a0 3d 7a 39 68 47 34 62 4b 36 34 33 33 35 34 37 37 =z9hG4bK64335477 00b0 33 0d 0a 46 72 6f 6d 3a 20 3c 73 69 70 3a 33 34 3..From: <sip:34 00c0 30 32 30 30 30 30 30 30 31 31 38 30 30 30 30 30 0200000011800000 00d0 30 31 40 34 34 30 31 30 32 30 30 34 39 3e 3b 74 01@4401020049>;t 00e0 61 67 3d 39 37 32 30 34 34 36 35 0d 0a 54 6f 3a ag=97204465..To: 00f0 20 3c 73 69 70 3a 33 34 30 32 30 30 30 30 30 30 <sip:3402000000 0100 31 31 38 30 30 30 30 30 30 31 40 34 34 30 31 30 1180000001@44010 0110 32 30 30 34 39 3e 0d 0a 43 61 6c 6c 2d 49 44 3a 20049>..Call-ID: 0120 20 32 30 33 36 33 39 35 33 37 0d 0a 43 53 65 71 203639537..CSeq 0130 3a 20 31 20 52 45 47 49 53 54 45 52 0d 0a 43 6f : 1 REGISTER..Co 0140 6e 74 61 63 74 3a 20 3c 73 69 70 3a 33 34 30 32 ntact: <sip:3402 0150 30 30 30 30 30 30 31 31 38 30 30 30 30 30 30 31 0000001180000001 0160 40 31 39 32 2e 31 36 38 2e 32 2e 32 30 32 3a 37 @192.168.2.202:7 0170 31 30 30 3e 0d 0a 4d 61 78 2d 46 6f 72 77 61 72 100>..Max-Forwar 0180 64 73 3a 20 37 30 0d 0a 45 78 70 69 72 65 73 3a ds: 70..Expires: 0190 20 33 36 30 30 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 3600..Content-L 01a0 65 6e 67 74 68 3a 20 30 0d 0a 0d 0a ength: 0....