Commit Graph
43 Commits
Author SHA1 Message Date
Maxim Galaganov d61d09aa0c Detect kernel support for MPTCP at runtime 2022-06-23 10:38:32 +08:00
Tristan Schmelcher 1630764b02 Fix --mptcp on kernels with mainlined MPTCP.
Mainlined MPTCP on Linux 5.6+ is enabled with IPPROTO_MPTCP rather than setsockopt.
2022-05-23 09:11:50 +08:00
Max Lv 8d8b1cdcd5 Refine TCP related headers. #2387 2019-06-01 20:38:14 +08:00
Max Lv 4a42da641b Allow bind to local IPv4/v6 addresses. Fix #2372 2019-05-09 10:59:16 +08:00
Max Lv 38e83d6b5d Make sure socket buffer size no larger than max chunk size 2019-04-30 09:34:31 +08:00
Max Lv a7291ea725 Enlarge the socket buffer size to 16KB.
After five years, memory footprint is not a problem for most of
low-end boxes and high-end routers now.

It should also improve the speed on loopback and high-speed LAN
networks.
2019-04-30 09:22:54 +08:00
Max Lv f35c162357 Reduce size of UDP remote context 2019-03-24 22:15:25 -04:00
Chinsyo 7bd382042b bump copyright year 2019-03-21 12:39:29 +08:00
Max Lv 3fa9e57248 Refine ipv6only handling 2019-03-10 07:40:07 +08:00
Max Lv 144138788b Refine ipv6 only handling. #2300 2019-03-01 07:32:25 +08:00
Linus Yang 2ed8791dab Re-add support for MinGW 2018-03-08 17:26:11 +08:00
Max Lv 85a64ae836 Bump version 2018-01-15 17:25:03 -08:00
Max Lv 2152274311 Force to disable new TFO API on Android 2017-11-28 16:53:48 +08:00
Max Lv 42b29fbb63 Fix cmake builds 2017-11-27 12:13:04 +08:00
Max Lv 9317d3b159 Fix the missing TFO flags on Android 2017-11-26 14:54:13 +08:00
Max Lv 2cad381036 Refine TFO in redir and server mode 2017-11-26 14:32:26 +08:00
Max Lv d445ea938b Refine TFO interface. #1800 2017-11-26 13:12:00 +08:00
Aaron LI e65b3b1505 Move <sys/socket.h> inclusion to fix build on DFlyBSD
The ``<sys/socket.h>`` header should be included in ``src/netutils.h``
before the usage of ``struct sockaddr_storage``, otherwise build failed
with errors such as:

```
In file included from udprelay.c:53:0:
netutils.h:68:22: error: 'struct sockaddr_storage' declared inside parameter list [-Werror]
                      int ipv6first);
                      ^
netutils.h:68:22: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
```

Tested on DragonFly BSD 4.9-development and Debian Linux testing.
2017-05-24 20:00:53 +08:00
Sebastien DUPONCHEEL 5074cd336d mptcp: make shadowsocks kernel independant 2017-03-03 20:14:00 +08:00
Max Lv f4b1641636 Fix #1217 2017-02-08 09:58:04 +08:00
Max Lv 4ebe5aeb12 Add SIP004 (AEAD) support 2017-01-29 10:10:44 +08:00
Max Lv 3f8cd982e5 Drop MinGW32 support 2017-01-24 20:10:31 +08:00
Max Lv 61b82c45c5 Add SIP003 plugin support (#1044)
https://github.com/shadowsocks/shadowsocks-org/issues/28
2017-01-08 01:10:00 -06:00
Max Lv 5cd294879b Add -6 option for #942 2016-11-12 11:01:05 +08:00
Max Lv 6d57b3cb56 Fix #912 2016-10-30 08:34:43 +08:00
Max Lv cfae8dcfcc Refine outbound feature #905 2016-10-29 08:11:53 +08:00
Simon Lelievre 3d11e59578 Add backward compatibility for MPTCP_ENABLED (#1) (#807) 2016-09-07 19:22:58 +08:00
Max Lv a3a51b8414 Refine hostname validation 2016-09-06 09:01:51 +08:00
Max Lv bf194fef75 Add validation of domain name 2016-08-31 09:45:47 +08:00
Max Lv 1773111a07 Fix mingw building 2016-08-11 15:19:53 +08:00
Max Lv 722d8d0c62 Fix build on Linux 2016-08-11 15:17:21 +08:00
Max Lv cf819ebec5 Fix #765 2016-08-11 12:26:22 +08:00
Max Lv 6f65fedbbd Move TCP_FASTOPEN to netutils.h 2016-08-08 12:59:33 +08:00
Max Lv d319c0300c Add mptcp option, close #756 2016-08-04 13:30:39 +08:00
Max Lv bb50fc22ca Add option for binding to address #626 2016-05-06 14:52:33 +08:00
Kim 08f873adc7 Roll up year to 2016 2016-04-22 22:50:26 +08:00
Max Lv 114128668c Refine helper functions 2016-04-16 00:43:27 +08:00
Syrone Wong a17d2f19ac Fix sockaddr comparison (#575)
This may fix #565

It is not recommended to compare two structs via memcmp although they have been
memset to 0.
Added two helper functions to compare sockaddr_storage, one for address only and
the other one takes port into account.

These two functions are based on Unbound version in util/net_help.c, and
comform needs of shadowsocks-libev.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-08 17:26:11 -07:00
Syrone Wong 58264c77fc Polish code
code issues found by Clang with
CFLAGS="-Os -Wall -Wextra -Werror=unused-const-variable -Wno-error=unused-parameter"
enabled

The details as follows:
- variable initialization issue, modified them as Clang suggested
- data type mismatch when comparing, fix them either by casting or changing
  the data type of index of iterator
- get_sockaddr() in netutils may return -1 thus changed returning type from
  size_t to ssize_t, which makes Clang happier
- recvfrom() in udprelay is identical, fix this by creating local variable
  for comparison  and assign back to buf->len when returning value is acceptable

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-07 21:28:23 -07:00
Max Lv e921f40aa8 Fix #493 2015-12-25 09:18:53 +08:00
Max Lv 9431b9b0c3 Add TPROXY support for redir mode 2015-05-05 14:37:27 +08:00
Max Lv b875797839 clean up 2015-03-05 14:16:28 +08:00
Max Lv 40e9be0021 Avoid getaddrinfo() in the main loop 2015-01-12 16:49:47 +09:00