109 Commits

Author SHA1 Message Date
wangyu-
6f55b8a2fc fix help page 2017-11-19 06:11:06 -06:00
wangyu-
85122b7155 help page 2017-11-19 06:07:40 -06:00
wangyu-
0cef4503be changed default mode to mode 0;improve help page 2017-11-19 06:02:20 -06:00
wangyu-
744c8f56ae Update README.zh-cn.md 2017-11-19 02:02:44 -08:00
wangyu-
8680b06882 Update README.zh-cn.md 2017-11-18 05:31:01 -08:00
wangyu-
57cce3a424 Update README.zh-cn.md 2017-11-18 05:30:23 -08:00
wangyu-
6ab4294bd9 Update README.zh-cn.md 2017-11-18 05:22:27 -08:00
wangyu-
ebdabb4598 Update README.zh-cn.md 2017-11-18 05:21:41 -08:00
wangyu-
c254545290 Update README.zh-cn.md 2017-11-18 01:14:33 -08:00
wangyu-
1301fdc96d Merge branch 'master' of https://github.com/wangyu-/UDPspeeder 2017-11-18 00:05:25 -06:00
wangyu-
f58dfe4fdd fixed a warn of last commit 2017-11-18 00:03:08 -06:00
wangyu-
3fd198a1e2 fixed a possible MTU issue when redundant num=0 2017-11-18 00:01:21 -06:00
wangyu-
017e851c2d Update README.md 2017-11-17 09:50:58 -08:00
wangyu-
2929eead0e Update README.md 2017-11-17 09:46:52 -08:00
wangyu-
e2c2f2dfec Update README.zh-cn.md 2017-11-17 09:12:30 -08:00
wangyu-
d0ebd67dbd Update README.md 2017-11-17 08:54:30 -08:00
wangyu-
211fcee8db Update README.zh-cn.md 2017-11-17 08:51:05 -08:00
wangyu-
6b4a2dfe21 increased timeout 2017-11-17 01:17:31 -06:00
wangyu-
65939eb9e7 Merge branch 'master' of https://github.com/wangyu-/UDPspeeder 2017-11-17 01:12:17 -06:00
wangyu-
9c00a2f3a6 increased timeout 2017-11-17 01:12:04 -06:00
wangyu-
4706e51fad Update README.zh-cn.md 2017-11-16 10:52:01 -08:00
wangyu-
c3786a91d8 Update README.zh-cn.md 2017-11-16 10:31:11 -08:00
wangyu-
680f127350 Update README.zh-cn.md 2017-11-16 10:28:57 -08:00
wangyu-
7713cf0c15 Update README.zh-cn.md 2017-11-16 10:18:16 -08:00
wangyu-
5024a02d20 Update README.zh-cn.md 2017-11-16 10:12:32 -08:00
wangyu-
f2d9deb2a3 Update README.zh-cn.md 2017-11-16 10:09:47 -08:00
wangyu-
c5c440245c Update README.zh-cn.md 2017-11-16 06:42:20 -08:00
wangyu-
c95e2db1af Update README.zh-cn.md 2017-11-16 06:41:26 -08:00
wangyu-
82a2b3cb9a Update README.zh-cn.md 2017-11-16 03:10:37 -08:00
wangyu-
8ecc696da5 Update README.zh-cn.md 2017-11-16 03:04:21 -08:00
wangyu-
6e6fc62fb8 Update README.zh-cn.md 2017-11-15 20:34:32 -08:00
wangyu-
ea03e5f8ec Update README.zh-cn.md 2017-11-15 20:33:21 -08:00
wangyu-
3be2642397 Update README.zh-cn.md 2017-11-15 20:31:47 -08:00
wangyu-
d05bcfc2f8 Update README.zh-cn.md 2017-11-15 20:28:48 -08:00
wangyu-
e50292bd4a Update README.zh-cn.md 2017-11-15 20:26:42 -08:00
wangyu-
363aec12d4 Update README.zh-cn.md 2017-11-12 20:40:01 -08:00
wangyu-
4364a7b789 Update README.zh-cn.md 2017-11-12 20:38:37 -08:00
wangyu-
17a42a1218 Update README.zh-cn.md 2017-11-11 14:33:20 -08:00
wangyu-
9152fef474 Update README.zh-cn.md 2017-11-11 14:29:46 -08:00
wangyu-
eb7406e6f3 Update README.zh-cn.md 2017-11-11 14:18:42 -08:00
wangyu-
296a84be3c Update README.zh-cn.md 2017-11-11 14:12:58 -08:00
wangyu-
69558ab16c Update README.zh-cn.md 2017-11-11 00:58:25 -08:00
wangyu-
37b7eb7282 Update README.zh-cn.md 2017-11-09 01:47:08 -08:00
wangyu-
4ca57cf656 Update README.zh-cn.md 2017-11-09 01:11:19 -08:00
wangyu-
1a744d69ea Update README.zh-cn.md 2017-11-08 15:59:24 -08:00
wangyu-
86b68697e1 Update README.zh-cn.md 2017-11-08 15:57:23 -08:00
wangyu-
63a2f923ab Update README.md 2017-11-08 15:54:54 -08:00
wangyu-
5774b478fc Update README.md 2017-11-08 15:54:12 -08:00
wangyu-
e91dcf6647 Update README.zh-cn.md 2017-11-08 15:50:31 -08:00
wangyu-
f6c97af854 Update README.md 2017-11-08 15:49:59 -08:00
wangyu-
2f097d720d changed a log 2017-11-08 03:59:36 -06:00
wangyu-
c6de39acc8 relax an assert 2017-11-08 03:53:13 -06:00
wangyu-
0f425a3a98 added version.txt 2017-11-08 03:38:23 -06:00
wangyu-
2cc560088b Update README.md 2017-11-07 02:58:34 -08:00
wangyu-
b83b21f2eb Merge branch 'master' of https://github.com/wangyu-/UDPspeeder 2017-11-07 03:55:01 -06:00
wangyu-
f526046846 do not drop packet in mode 1 2017-11-07 03:54:54 -06:00
wangyu-
1be5fb5fc1 Update README.zh-cn.md 2017-11-06 18:53:00 -08:00
wangyu-
27874aa413 changed parameter 2017-11-06 03:19:28 -06:00
wangyu-
fde2329528 Merge branch 'master' of https://github.com/wangyu-/UDPspeeder 2017-11-06 03:17:38 -06:00
wangyu-
30b78c1339 changed parameter 2017-11-06 03:17:34 -06:00
wangyu-
17a3074b34 Update README.zh-cn.md 2017-11-05 03:38:20 -08:00
wangyu-
cce7d18163 Update README.zh-cn.md 2017-11-04 21:50:37 -07:00
wangyu-
90029e1ea7 Update README.zh-cn.md 2017-11-03 22:50:24 -07:00
wangyu-
c26a4708ee Update README.zh-cn.md 2017-11-03 22:49:28 -07:00
wangyu-
fdbf4ab205 Update udpspeeder_openvpn.md 2017-11-03 22:46:33 -07:00
wangyu-
7ee72ee84c Update udpspeeder_openvpn.md 2017-11-03 22:45:39 -07:00
wangyu-
cac5f8271c Update README.zh-cn.md 2017-10-31 21:19:26 -07:00
wangyu-
219e8e2592 Update README.zh-cn.md 2017-10-31 21:18:33 -07:00
wangyu-
02b4d59500 Update README.zh-cn.md 2017-10-31 21:18:02 -07:00
wangyu-
894bf7cd0d Update README.zh-cn.md 2017-10-31 20:52:50 -07:00
wangyu-
a8cab43139 Update README.zh-cn.md 2017-10-31 20:52:31 -07:00
wangyu-
369a9d8e1b Update README.zh-cn.md 2017-10-31 20:51:39 -07:00
wangyu-
0f7894f42f revert last comit 2017-10-31 22:29:16 -05:00
wangyu-
d7daae25bf relax restriction for fec_data_num==1 2017-10-31 22:14:57 -05:00
wangyu-
d7271b74b4 Merge branch 'master' of https://github.com/wangyu-/UDPspeeder 2017-10-31 22:05:58 -05:00
wangyu-
1eeef14470 update log 2017-10-31 22:05:51 -05:00
wangyu-
9d30caffc9 Add files via upload 2017-11-01 10:35:01 +08:00
wangyu-
e50e383ede Delete ping_compare_cn.PNG 2017-10-31 19:34:47 -07:00
wangyu-
c73a197971 Update README.zh-cn.md 2017-10-31 19:31:24 -07:00
wangyu-
ba44617124 Add files via upload 2017-11-01 10:30:10 +08:00
wangyu-
19e718f0a3 new function tcp csum 2017-10-31 19:43:25 -05:00
wangyu-
bd323be9c4 fixed log 2017-10-30 20:29:04 -05:00
wangyu-
35a85e38ae fixed a missed continue 2017-10-30 11:23:37 -05:00
wangyu-
4871983b8f Update README.zh-cn.md 2017-10-30 08:40:17 -07:00
wangyu-
fec3c39cad Update README.zh-cn.md 2017-10-30 08:38:18 -07:00
wangyu-
4d55348a4d Update README.md 2017-10-30 08:35:41 -07:00
wangyu-
36eef02d8a Update README.md 2017-10-30 08:35:24 -07:00
wangyu-
3fd48dd20e Update README.md 2017-10-30 08:33:56 -07:00
wangyu-
766aa274d9 Update README.md 2017-10-30 08:33:36 -07:00
wangyu-
d961537682 Update udpspeeder_openvpn.md 2017-10-29 23:42:21 -07:00
wangyu-
4dcfe87bd3 Update README.zh-cn.md 2017-10-29 20:47:23 -07:00
wangyu-
2aa0ece465 Update README.md 2017-10-29 20:46:24 -07:00
wangyu-
05fd84b675 Update README.zh-cn.md 2017-10-29 03:41:28 -07:00
wangyu-
1e00ff7c87 add option keep-reconnect 2017-10-28 08:56:24 -05:00
wangyu-
c76818c6a8 trival 2017-10-28 07:44:25 -05:00
wangyu-
e3e2fe6d36 changed default sub-net 2017-10-28 06:48:24 -05:00
wangyu-
7cd87e7b59 trival 2017-10-28 04:36:37 -05:00
wangyu-
c3aae9579b refactor 2017-10-28 02:05:14 -05:00
wangyu-
d9f80781a2 changed --tun-dev to required argument 2017-10-28 01:45:50 -05:00
wangyu-
203604e1b5 Merge branch 'master' of https://github.com/wangyu-/UDPspeeder 2017-10-28 01:03:12 -05:00
wangyu-
5ac6e30c8e removed tun_dev.cpp and .h 2017-10-28 01:02:58 -05:00
wangyu-
6728d5a561 add dest ip restriction 2017-10-28 00:45:19 -05:00
wangyu-
f9eaae172f fixed typo 2017-10-27 23:19:08 -05:00
wangyu-
a0eeedb12a more log,more robust 2017-10-27 22:51:33 -05:00
wangyu-
324d34c87a Update README.zh-cn.md 2017-10-27 20:25:17 -07:00
wangyu-
1fe64b5689 Update README.zh-cn.md 2017-10-27 20:20:35 -07:00
wangyu-
d5e900e91c aloww len==fec_mtu 2017-10-27 21:16:59 -05:00
wangyu-
8e00273db4 just commit 2017-10-27 08:28:43 -05:00
wangyu-
73d68a2baf just commit 2017-10-27 05:23:46 -05:00
8 changed files with 71 additions and 104 deletions

View File

@@ -1,6 +0,0 @@
For English speaking user
https://github.com/wangyu-/UDPspeeder/wiki/Issue-Guide
中文用户请看:
https://github.com/wangyu-/UDPspeeder/wiki/发Issue前请看
(否则Issue可能被忽略或被直接关掉)

View File

@@ -78,7 +78,7 @@ Assume your server ip is 44.55.66.77, you have a service listening on udp port 7
./speederv2 -c -l0.0.0.0:3333 -r44.55.66.77:4096 -f20:10 -k "passwd"
```
Now connecting to UDP port 3333 at the client side is equivalent to connecting to port 7777 at the server side, and the connection has been boosted by UDPspeeder.
Now connecting to UDP port 3333 at the client side is equivalent to connecting to port 7777 at the server side, and the connection is boosted by UDPspeeder.
##### Note
@@ -86,52 +86,52 @@ Now connecting to UDP port 3333 at the client side is equivalent to connecting t
`-k` enables simple XOR encryption
To run stably, pay attention to MTU. You can also try `--mode 0`,there will be no MTU problem in this mode.
# Advanced Topic
### Full Options
```
UDPspeeder V2
git version: 6f55b8a2fc build date: Nov 19 2017 06:11:23
git version:8e7a8aed92 build date:Oct 25 2017 02:00:54
repository: https://github.com/wangyu-/UDPspeeder
usage:
run as client: ./this_program -c -l local_listen_ip:local_port -r server_ip:server_port [options]
run as server: ./this_program -s -l server_listen_ip:server_port -r remote_ip:remote_port [options]
run as client : ./this_program -c -l local_listen_ip:local_port -r server_ip:server_port [options]
run as server : ./this_program -s -l server_listen_ip:server_port -r remote_ip:remote_port [options]
common options, must be same on both sides:
-k,--key <string> key for simple xor encryption. if not set, xor is disabled
common option,must be same on both sides:
-k,--key <string> key for simple xor encryption. if not set,xor is disabled
main options:
-f,--fec x:y forward error correction, send y redundant packets for every x packets
--timeout <number> how long could a packet be held in queue before doing fec, unit: ms, default: 8ms
--report <number> turn on send/recv report, and set a period for reporting, unit: s
-f,--fec x:y forward error correction,send y redundant packets for every x packets
--timeout <number> how long could a packet be held in queue before doing fec,unit: ms,default :8ms
--mode <number> fec-mode,available values: 0,1 ; 0 cost less bandwidth,1 cost less latency(default)
--report <number> turn on send/recv report,and set a period for reporting,unit:s
advanced options:
--mode <number> fec-mode,available values: 0,1; mode 0(default) costs less bandwidth,no mtu problem.
mode 1 usually introduces less latency, but you have to care about mtu.
--mtu <number> mtu. for mode 0, the program will split packet to segment smaller than mtu value.
for mode 1, no packet will be split, the program just check if the mtu is exceed.
default value: 1250. you typically shouldnt change this value.
-q,--queue-len <number> fec queue len, only for mode 0, fec will be performed immediately after queue is full.
default value: 200.
-j,--jitter <number> simulated jitter. randomly delay first packet for 0~<number> ms, default value: 0.
--mtu <number> mtu. for mode 0,the program will split packet to segment smaller than mtu_value.
for mode 1,no packet will be split,the program just check if the mtu is exceed.
default value:1250
-j,--jitter <number> simulated jitter.randomly delay first packet for 0~<number> ms,default value:0.
do not use if you dont know what it means.
-i,--interval <number> scatter each fec group to a interval of <number> ms, to protect burst packet loss.
default value: 0. do not use if you dont know what it means.
--random-drop <number> simulate packet loss, unit: 0.01%. default value: 0.
--disable-obscure <number> disable obscure, to save a bit bandwidth and cpu.
-i,--interval <number> scatter each fec group to a interval of <number> ms,to protect burst packet loss.
default value:0.do not use if you dont know what it means.
--random-drop <number> simulate packet loss ,unit:0.01%. default value: 0
--disable-obscure <number> disable obscure,to save a bit bandwidth and cpu
developer options:
--fifo <string> use a fifo(named pipe) for sending commands to the running program, so that you
can change fec encode parameters dynamically, check readme.md in repository for
--fifo <string> use a fifo(named pipe) for sending commands to the running program,so that you
can change fec encode parameters dynamically,check readme.md in repository for
supported commands.
-j ,--jitter jmin:jmax similiar to -j above, but create jitter randomly between jmin and jmax
-i,--interval imin:imax similiar to -i above, but scatter randomly between imin and imax
--decode-buf <number> size of buffer of fec decoder,u nit: packet, default: 2000
--fix-latency <number> try to stabilize latency, only for mode 0
-j ,--jitter jmin:jmax similiar to -j above,but create jitter randomly between jmin and jmax
-i,--interval imin:imax similiar to -i above,but scatter randomly between imin and imax
-q,--queue-len <number> max fec queue len,only for mode 0
--decode-buf <number> size of buffer of fec decoder,unit:packet,default:2000
--fix-latency <number> try to stabilize latency,only for mode 0
--delay-capacity <number> max number of delayed packets
--disable-fec <number> completely disable fec, turn the program into a normal udp tunnel
--sock-buf <number> buf size for socket, >=10 and <=10240, unit: kbyte, default: 1024
--disable-fec <number> completely disable fec,turn the program into a normal udp tunnel
--sock-buf <number> buf size for socket,>=10 and <=10240,unit:kbyte,default:1024
log and help options:
--log-level <number> 0: never 1: fatal 2: error 3: warn
4: info (default) 5: debug 6: trace
--log-position enable file name, function name, line number in log
--log-level <number> 0:never 1:fatal 2:error 3:warn
4:info (default) 5:debug 6:trace
--log-position enable file name,function name,line number in log
--disable-color disable log color
-h,--help print this help message

View File

@@ -52,7 +52,7 @@ u64_t get_current_time()//ms
{
timespec tmp_time;
clock_gettime(CLOCK_MONOTONIC, &tmp_time);
return ((u64_t)tmp_time.tv_sec)*1000llu+((u64_t)tmp_time.tv_nsec)/(1000*1000llu);
return tmp_time.tv_sec*1000+tmp_time.tv_nsec/(1000*1000l);
}
u64_t get_current_time_us()

View File

@@ -94,53 +94,49 @@ https://github.com/wangyu-/UDPspeeder/releases
### 命令选项
```
UDPspeeder V2
git version: 6f55b8a2fc build date: Nov 19 2017 06:11:23
git version:8e7a8aed92 build date:Oct 25 2017 02:00:54
repository: https://github.com/wangyu-/UDPspeeder
usage:
run as client: ./this_program -c -l local_listen_ip:local_port -r server_ip:server_port [options]
run as server: ./this_program -s -l server_listen_ip:server_port -r remote_ip:remote_port [options]
run as client : ./this_program -c -l local_listen_ip:local_port -r server_ip:server_port [options]
run as server : ./this_program -s -l server_listen_ip:server_port -r remote_ip:remote_port [options]
common options, must be same on both sides:
-k,--key <string> key for simple xor encryption. if not set, xor is disabled
common option,must be same on both sides:
-k,--key <string> key for simple xor encryption. if not set,xor is disabled
main options:
-f,--fec x:y forward error correction, send y redundant packets for every x packets
--timeout <number> how long could a packet be held in queue before doing fec, unit: ms, default: 8ms
--report <number> turn on send/recv report, and set a period for reporting, unit: s
-f,--fec x:y forward error correction,send y redundant packets for every x packets
--timeout <number> how long could a packet be held in queue before doing fec,unit: ms,default :8ms
--mode <number> fec-mode,available values: 0,1 ; 0 cost less bandwidth,1 cost less latency(default)
--report <number> turn on send/recv report,and set a period for reporting,unit:s
advanced options:
--mode <number> fec-mode,available values: 0,1; mode 0(default) costs less bandwidth,no mtu problem.
mode 1 usually introduces less latency, but you have to care about mtu.
--mtu <number> mtu. for mode 0, the program will split packet to segment smaller than mtu value.
for mode 1, no packet will be split, the program just check if the mtu is exceed.
default value: 1250. you typically shouldnt change this value.
-q,--queue-len <number> fec queue len, only for mode 0, fec will be performed immediately after queue is full.
default value: 200.
-j,--jitter <number> simulated jitter. randomly delay first packet for 0~<number> ms, default value: 0.
--mtu <number> mtu. for mode 0,the program will split packet to segment smaller than mtu_value.
for mode 1,no packet will be split,the program just check if the mtu is exceed.
default value:1250
-j,--jitter <number> simulated jitter.randomly delay first packet for 0~<number> ms,default value:0.
do not use if you dont know what it means.
-i,--interval <number> scatter each fec group to a interval of <number> ms, to protect burst packet loss.
default value: 0. do not use if you dont know what it means.
--random-drop <number> simulate packet loss, unit: 0.01%. default value: 0.
--disable-obscure <number> disable obscure, to save a bit bandwidth and cpu.
-i,--interval <number> scatter each fec group to a interval of <number> ms,to protect burst packet loss.
default value:0.do not use if you dont know what it means.
--random-drop <number> simulate packet loss ,unit:0.01%. default value: 0
--disable-obscure <number> disable obscure,to save a bit bandwidth and cpu
developer options:
--fifo <string> use a fifo(named pipe) for sending commands to the running program, so that you
can change fec encode parameters dynamically, check readme.md in repository for
--fifo <string> use a fifo(named pipe) for sending commands to the running program,so that you
can change fec encode parameters dynamically,check readme.md in repository for
supported commands.
-j ,--jitter jmin:jmax similiar to -j above, but create jitter randomly between jmin and jmax
-i,--interval imin:imax similiar to -i above, but scatter randomly between imin and imax
--decode-buf <number> size of buffer of fec decoder,u nit: packet, default: 2000
--fix-latency <number> try to stabilize latency, only for mode 0
-j ,--jitter jmin:jmax similiar to -j above,but create jitter randomly between jmin and jmax
-i,--interval imin:imax similiar to -i above,but scatter randomly between imin and imax
-q,--queue-len <number> max fec queue len,only for mode 0
--decode-buf <number> size of buffer of fec decoder,unit:packet,default:2000
--fix-latency <number> try to stabilize latency,only for mode 0
--delay-capacity <number> max number of delayed packets
--disable-fec <number> completely disable fec, turn the program into a normal udp tunnel
--sock-buf <number> buf size for socket, >=10 and <=10240, unit: kbyte, default: 1024
--disable-fec <number> completely disable fec,turn the program into a normal udp tunnel
--sock-buf <number> buf size for socket,>=10 and <=10240,unit:kbyte,default:1024
log and help options:
--log-level <number> 0: never 1: fatal 2: error 3: warn
4: info (default) 5: debug 6: trace
--log-position enable file name, function name, line number in log
--log-level <number> 0:never 1:fatal 2:error 3:warn
4:info (default) 5:debug 6:trace
--log-position enable file name,function name,line number in log
--disable-color disable log color
-h,--help print this help message
```
### 包发送选项,两端设置可以不同。 只影响本地包发送。
##### `-f` 选项
@@ -240,9 +236,7 @@ run at client side:
如果只需要加速UDP不需要加速TCP可以把kcptun换成其他的任意端口转发方式比如ncat/socat/ssh tunnel/iptables/[tinyPortMapper](https://github.com/wangyu-/tinyPortMapper/releases)。
如果没有kcptun只有BBR/锐速的话也可以把kcptun换成ncat/socat/ssh tunnel/iptables/[tinyPortMapper](https://github.com/wangyu-/tinyPortMapper/releases)。这样TCP流量由锐速/BBR加速UDP由UDPspeeder加速。
另外,即使你不想使用$\*\*\*的TCP功能你也必须把$\*\*\*的TCP端口转发过来否则无法使用UDP功能这是socks5协议的工作方式决定的。($\*\*\*-redir方式不受此限制)
另外,如果没有kcptun只有BBR/锐速的话也可以把kcptun换成ncat/socat/ssh tunnel/iptables/[tinyPortMapper](https://github.com/wangyu-/tinyPortMapper/releases)。这样TCP流量由锐速/BBR加速UDP由UDPspeeder加速。
#### UDPspeeder + openvpn + $*** 混合方案也适用于其他VPN
也是我正在用的方案。优点是可以随时在vpn和$\*\*\*方案间快速切换。
@@ -263,23 +257,12 @@ run at client side:
https://github.com/wangyu-/UDPspeeder/wiki/win10系统UDPspeeder-OpenVPN的完整设置
#### UDPspeeder+OpenVPN运行在linux上透明加速linux本机的网络
https://github.com/wangyu-/tinyFecVPN/wiki/tinyFecVPN运行在linux上透明加速linux本机的网络
#### UDPspeeder+OpenVPN运行在虚拟机中加速windows和局域网内其他主机的网络
https://github.com/wangyu-/tinyFecVPN/wiki/tinyFecVPN运行在虚拟机中加速windows和局域网内其他主机的网络
#### 用树莓派做路由器,搭建透明代理,加速游戏主机的网络
https://github.com/wangyu-/UDPspeeder/wiki/用树莓派做路由器,搭建透明代理,加速游戏主机的网络
# 编译教程
暂时先参考udp2raw的这篇教程几乎一样的过程。
https://github.com/wangyu-/udp2raw-tunnel/blob/master/doc/build_guide.zh-cn.md

View File

@@ -15,7 +15,6 @@ int mtu_warn=1350;
int disable_mtu_warn=1;
int disable_fec=0;
int disable_checksum=0;
int debug_force_flush_fec=0;
@@ -559,7 +558,6 @@ void process_arg(int argc, char *argv[])
{"disable-fec", no_argument, 0, 1},
{"disable-obscure", no_argument, 0, 1},
{"disable-xor", no_argument, 0, 1},
{"disable-checksum", no_argument, 0, 1},
{"fix-latency", no_argument, 0, 1},
{"sock-buf", required_argument, 0, 1},
{"random-drop", required_argument, 0, 1},
@@ -780,11 +778,6 @@ void process_arg(int argc, char *argv[])
mylog(log_info,"xor disabled\n");
disable_xor=1;
}
else if(strcmp(long_options[option_index].name,"disable-checksum")==0)
{
disable_checksum=1;
mylog(log_warn,"checksum disabled\n");
}
else if(strcmp(long_options[option_index].name,"fix-latency")==0)
{
mylog(log_info,"fix-latency enabled\n");

1
misc.h
View File

@@ -22,7 +22,6 @@ extern int mtu_warn;
extern int disable_mtu_warn;
extern int disable_fec;
extern int disable_checksum;
extern int debug_force_flush_fec;

View File

@@ -9,7 +9,6 @@
#include "common.h"
#include "log.h"
#include "packet.h"
#include "misc.h"
int iv_min=4;
int iv_max=32;//< 256;
@@ -316,7 +315,6 @@ int get_conv0(u32_t &conv,const char *input,int len_in,char *&output,int &len_ou
}
int put_crc32(char * s,int &len)
{
if(disable_checksum)return 0;
assert(len>=0);
//if(len<0) return -1;
u32_t crc32=crc32h((unsigned char *)s,len);
@@ -357,8 +355,8 @@ int de_cook(char * s,int &len)
}
int rm_crc32(char * s,int &len)
{
if(disable_checksum)return 0;
assert(len>=0);
len-=sizeof(u32_t);
if(len<0) return -1;
u32_t crc32_in=read_u32(s+len);

View File

@@ -113,12 +113,12 @@ int tunnel_client_event_loop()
if (nfds < 0) { //allow zero
if(errno==EINTR )
{
mylog(log_info,"epoll interrupted by signal continue\n");
//myexit(0);
mylog(log_info,"epoll interrupted by signal\n");
myexit(0);
}
else
{
mylog(log_fatal,"epoll_wait return %d,%s\n", nfds,strerror(errno));
mylog(log_fatal,"epoll_wait return %d\n", nfds);
myexit(-1);
}
}
@@ -417,12 +417,12 @@ int tunnel_server_event_loop()
if (nfds < 0) { //allow zero
if(errno==EINTR )
{
mylog(log_info,"epoll interrupted by signal,continue\n");
//myexit(0);
mylog(log_info,"epoll interrupted by signal\n");
myexit(0);
}
else
{
mylog(log_fatal,"epoll_wait return %d,%s\n", nfds,strerror(errno));
mylog(log_fatal,"epoll_wait return %d\n", nfds);
myexit(-1);
}
}