Commit Graph
1070 Commits
Author SHA1 Message Date
Jared Hillier b7f3e2226c TCP Fast Open support for ss-tunnel (#2150)
* ...

* ...

* ...

* Update README.md

* Update README.md

* TCP Fast Open support

* TCP Fast Open support

* TCP Fast Open CONNECT_IN_PROGRESS

* TCP Fast Open support

* TCP Fast Open support

* TCP Fast Open support

* TCP Fast Open support

* TCP Fast Open support via conf

* Cross-platform support for TCP Fast Open

* Cross-platform support for TCP Fast Open

* Enable SO_KEEPALIVE client side

* TCP Fast Open is not supported on this platform

* TCP Fast Open support

* Update tunnel.c

* It's from my forked repo, so please ignore any changes in README.md

* Fix trailing whitespace

* Fix #1376
2018-08-28 18:42:48 +08:00
Mygod 307088ed4a Support hostname resolving in VPN mode 2018-08-24 14:00:13 +08:00
sxyoxygen 46e2b28d39 Update utils.h 2018-08-08 12:03:56 +08:00
sxyoxygen 059780ff9b Update local.c 2018-08-08 01:56:37 +08:00
sxyoxygen 8356d8ae74 Update server.c 2018-08-08 01:56:12 +08:00
sxyoxygen 95c1dba176 Update utils.c 2018-08-08 01:47:19 +08:00
sxyoxygen 9e7a99378a Update utils.h 2018-08-08 01:45:59 +08:00
Mygod d107f9ecdb More bugfix 2018-07-30 23:50:35 +08:00
Max Lv 9387267267 Merge pull request #2132 from Mygod/master
Refine local server_handshake
2018-07-30 23:15:54 +08:00
Max Lv fad3ca59e7 Revert "Refine ip initialization"
This reverts commit 9a56155513.
2018-07-30 23:15:28 +08:00
Max Lv 9a56155513 Refine ip initialization 2018-07-30 23:06:22 +08:00
Mygod 78aa6521cd Bugfix 2018-07-30 23:06:02 +08:00
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.
2018-07-30 22:52:40 +08:00
Hang cab3057f3d Delete unnecessary code 2018-07-11 17:33:11 +08:00
hwchan 00354513e6 Multipe nameservers support 2018-07-07 17:05:34 +08:00
Max Lv 11a0d8db60 Reset timer in server_stream as well 2018-07-02 12:51:20 +08:00
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
2018-06-16 19:47:39 +09:00
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
2018-06-07 08:58:10 +08:00
Max Lv 873a577726 Add winsock.h to dist target 2018-05-28 21:53:13 -07:00
Max Lv a0ef456977 Fix #2051 2018-05-24 16:54:57 +08:00
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.
2018-05-09 23:20:13 +00:00
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.
2018-05-08 21:16:28 +00:00
Max Lv 8d3ce8b77c Make sure ev_io_stop before ev_io_set 2018-05-07 09:05:38 +08:00
Max Lv 204037b100 Simplify the handshake part 2018-05-06 11:41:29 +08:00
Max Lv c61736e903 Set the minimum resolv timeout to be one second 2018-05-04 10:33:09 +08:00
FlyingheartCN 662b6db3f3 Fix Build Fail with GCC8 2018-05-04 01:41:36 +08:00
Max Lv dada99c5b6 Fix the SNI issue 2018-04-08 22:32:21 -07:00
Max Lv c377dcac97 Merge pull request #2017 from rallet/master
Ignore SIGCHLD for library usage
2018-04-09 09:47:32 +08:00
Max Lv 2c2063a792 Fix a warning on Android 2018-04-08 18:36:38 -07:00
Max Lv d4298f71f0 Refine the code structure 2018-04-08 18:32:32 -07:00
Rallets 5d17c0431f Ignore SIGCHLD for library usage 2018-04-08 12:51:45 +08:00
Mygod a4c9059ffe Fix all routing not working in Android
This reverts commit 66ed595c52.
2018-04-04 19:02:26 -07:00
Max Lv 68f885c271 Fix plugin on Android 2018-04-04 23:44:24 +08:00
Max Lv 3e7c852970 Fix a crash 2018-04-01 21:27:16 -07:00
Max Lv cd72e28bcb Add missing option 2018-04-01 20:01:16 -07:00
Max Lv 7e414bb993 Disable SNI when DNS forwarding enabled 2018-04-01 10:15:06 +08:00
Max Lv 66ed595c52 Add back the SNI addr reconstructor 2018-03-30 01:14:44 -07:00
Max Lv 20332eb04b Fix #1999 2018-03-26 19:48:19 -07:00
Linus Yang e02ad6b1bc MinGW: Override gai_strerror 2018-03-23 04:27:50 +08:00
Linus Yang 6315f6c3cd MinGW: get console only once 2018-03-23 03:38:12 +08:00
Linus Yang 4ee1d18ce9 MinGW: support color text in console 2018-03-23 02:59:50 +08:00
Linus Yang 1f9dd2fbf4 MinGW: fix socket closing in wrong place 2018-03-22 19:31:01 +08:00
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
2018-03-20 13:54:49 +08:00
Linus Yang 14fb82b966 Enable plugins on MinGW 2018-03-14 09:58:25 +08:00
Max Lv a377c5114a Fix #1974 2018-03-13 02:58:48 -07:00
Linus Yang 3f00e533bf Minor format fix 2018-03-12 13:16:37 +08:00
Linus Yang ca51c60ee7 Only define TCP_FASTOPEN if not exists 2018-03-12 12:57:52 +08:00
Linus Yang 0a11c87aa5 Do not override error code of setsockopt 2018-03-12 12:41:51 +08:00
Linus Yang b4c5021c65 Missing macro for MinGW 2018-03-10 23:44:27 +08:00
Linus Yang 87b7dd85a9 Correct header inclusion 2018-03-10 16:34:28 +08:00