xnor
14b6261b40
Optimize resolv timer
Don't call ares_timeout since it does a search through all queries.
Instead, schedule a timer that fires after 1 second. If no activity happened
for over 1 second do ares timeout processing, otherwise reschedule the timer
to fire after the remaining timeout.
This also completely avoids the ev_timer_again calls for each single fd event.
7 years ago
xnor
a5db5ef71f
Fix DNS timeouts
C-ares creates up to two sockets per nameserver. With up to three nameservers
in resolv.conf this makes a max of six active sockets.
Having only one ev_io watcher resulted in closing watchers that were
still active, needlessly resulting in DNS timeouts.
7 years ago
Max Lv
8d3ce8b77c
Make sure ev_io_stop before ev_io_set
7 years ago
Max Lv
204037b100
Simplify the handshake part
7 years ago
Max Lv
c61736e903
Set the minimum resolv timeout to be one second
7 years ago
FlyingheartCN
662b6db3f3
Fix Build Fail with GCC8
7 years ago
Max Lv
dada99c5b6
Fix the SNI issue
7 years ago
Max Lv
2c2063a792
Fix a warning on Android
7 years ago
Max Lv
d4298f71f0
Refine the code structure
7 years ago
Rallets
5d17c0431f
Ignore SIGCHLD for library usage
7 years ago
Mygod
a4c9059ffe
Fix all routing not working in Android
This reverts commit 66ed595c52
.
7 years ago
Max Lv
68f885c271
Fix plugin on Android
7 years ago
Max Lv
3e7c852970
Fix a crash
7 years ago
Max Lv
cd72e28bcb
Add missing option
7 years ago
Max Lv
7e414bb993
Disable SNI when DNS forwarding enabled
7 years ago
Max Lv
66ed595c52
Add back the SNI addr reconstructor
7 years ago
Max Lv
20332eb04b
Fix #1999
7 years ago
Linus Yang
e02ad6b1bc
MinGW: Override gai_strerror
7 years ago
Linus Yang
6315f6c3cd
MinGW: get console only once
7 years ago
Linus Yang
4ee1d18ce9
MinGW: support color text in console
7 years ago
Linus Yang
1f9dd2fbf4
MinGW: fix socket closing in wrong place
7 years ago
Kim
d61b8f0c33
Update plugin.c
Launch plugin with NULL params gives plugin to run in both plugin mode & cli mode.
See https://github.com/cbeuw/GoQuiet/issues/15
7 years ago
Linus Yang
14fb82b966
Enable plugins on MinGW
7 years ago
Max Lv
a377c5114a
Fix #1974
7 years ago
Linus Yang
3f00e533bf
Minor format fix
7 years ago
Linus Yang
ca51c60ee7
Only define TCP_FASTOPEN if not exists
7 years ago
Linus Yang
0a11c87aa5
Do not override error code of setsockopt
7 years ago
Linus Yang
b4c5021c65
Missing macro for MinGW
7 years ago
Linus Yang
87b7dd85a9
Correct header inclusion
7 years ago
Linus Yang
f4c612f832
Support TCP fast open on Windows
7 years ago
Linus Yang
2ed8791dab
Re-add support for MinGW
7 years ago
Max Witten
e7ad7fc73e
udprelay: display mtu at least size
7 years ago
Max Lv
26e06a7a1d
Fix #1948
7 years ago
Syrone Wong
abba447f13
mbedtls: simplify new MD5 API
7 years ago
Max Lv
6e1e005221
Fix #1908
7 years ago
hwchan
fb22adcb92
Fix https://github.com/shadowsocks/shadowsocks-libev/issues/1945
Refer: 4af9a1b62b
7 years ago
DDoSolitary
7b643dce7e
Invoke plugins direct instead of using "sh".
See #1928 for details.
7 years ago
Max Lv
f8b18cc793
Refine the bind_to_address
7 years ago
Max Lv
8acbe68e66
Fix #1915
7 years ago
ksqsf
eb501b70c7
Oops.. Remove useless code.
7 years ago
ksqsf
2a3d3bc13c
Remove pointless optimization in get_default_conf()
7 years ago
ksqsf
3c3c50b4f8
Search XDG_CONFIG_HOME for user-specific config
7 years ago
Max Lv
5fa98a6693
Fix #1911
7 years ago
Max Lv
1a21989566
Remove the return value in traffic IPC
7 years ago
Max Lv
b361f75f31
Remove unused return value
7 years ago
Terry Chan
b6faadf857
Support TCP_NODELAY in manager mode
7 years ago
Terry Chan
ed508ac142
Fix no parse --fast-open in manager mode
7 years ago
Max Lv
85a64ae836
Bump version
7 years ago
Max Lv
29ff5d3f89
Avoid overwriting dst_addr
7 years ago
Max Lv
b95495e71d
Remove the log of sockaddr_cmp
7 years ago