Mygod
4a97acd44e
Refine local server_handshake
* Removed STAGE_PARSE and the 5-year-old hacky "fake" reply;
* SOCKS5 server returns more error code than 0x07;
* Ensure `ip` is initialized in all cases; (I guess security guys don't want to audit the local part)
* Code more readable magically.
6 years ago
Hang
cab3057f3d
Delete unnecessary code
6 years ago
hwchan
00354513e6
Multipe nameservers support
6 years ago
Max Lv
11a0d8db60
Reset timer in server_stream as well
6 years ago
Roger Shimizu
d88345fa46
Fix of PATH_MAX for GNU/Hurd
Memory of userconf in src/utils.c:get_default_conf() only gets allocated
once, and will not be freed. It's used as static buffer.
This can avoid using PATH_MAX, which actually doesn't exist on certain
platforms.
Info:
- https://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html
- https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL
6 years ago
Yegor Ievlev
8fd83e2686
Use chacha20-ietf as a default cipher instead of rc4-md5 ( #2080 )
* Use chacha20-ietf as a default cipher instead of rc4-md5
* Update tunnel.c
* Update utils.c
* Update ss-local.asciidoc
* Update ss-local.asciidoc
* Update tunnel.c
* Update ss-tunnel.asciidoc
* Update ss-manager.asciidoc
* Update ss-redir.asciidoc
* Update shadowsocks-libev.asciidoc
* Update aead.c
* Update local.c
* Update server.c
* Update utils.c
6 years ago
Max Lv
873a577726
Add winsock.h to dist target
6 years ago
Max Lv
a0ef456977
Fix #2051
6 years ago
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.
6 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.
6 years ago
Max Lv
8d3ce8b77c
Make sure ev_io_stop before ev_io_set
6 years ago
Max Lv
204037b100
Simplify the handshake part
6 years ago
Max Lv
c61736e903
Set the minimum resolv timeout to be one second
6 years ago
FlyingheartCN
662b6db3f3
Fix Build Fail with GCC8
6 years ago
Max Lv
dada99c5b6
Fix the SNI issue
6 years ago
Max Lv
2c2063a792
Fix a warning on Android
6 years ago
Max Lv
d4298f71f0
Refine the code structure
6 years ago
Rallets
5d17c0431f
Ignore SIGCHLD for library usage
6 years ago
Mygod
a4c9059ffe
Fix all routing not working in Android
This reverts commit 66ed595c52
.
6 years ago
Max Lv
68f885c271
Fix plugin on Android
6 years ago
Max Lv
3e7c852970
Fix a crash
6 years ago
Max Lv
cd72e28bcb
Add missing option
6 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