Commit Graph
1078 Commits
Author SHA1 Message Date
Max Lv ed7c1e64af Fix a compilation issue for GCC < 5.0 2018-09-13 14:20:07 -07:00
edsgerlin 761e66a969 Implement AES256-GCM with precomputation. 2018-09-12 02:14:11 +09:00
edsgerlin 79592a8b16 Use libsodium for aes-256-gcm when available. 2018-09-12 00:52:33 +09:00
Max Lv 57e74eaa34 Fix a bug in bypassing 2018-09-08 11:38:18 +08:00
Max Lv 46ff0a8045 Refine #2162 2018-09-02 17:27:59 -07:00
Max Lv dd5e954ab4 Clean up 2018-09-02 17:21:23 -07:00
Max Lv 1dcfe68c8c Fix #2162 2018-09-02 12:43:37 +08:00
Max Lv cd98427ebd Add missing fast open headers 2018-08-29 01:38:43 -07:00
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