141 Commits
Author SHA1 Message Date
Max Lv e3f0429ab3 Fix #819 2016-09-10 17:01:02 +08:00
Max Lv b28638ab80 Clean up 2016-09-09 13:17:58 +08:00
Max Lv 6c6f986576 Fix a typo 2016-08-12 16:09:38 +08:00
Max Lv 722d8d0c62 Fix build on Linux 2016-08-11 15:17:21 +08:00
Max Lv 1df8d06e3e Refine QoS flag for UDP forwarding 2016-08-08 09:20:49 +08:00
Max Lv 915047e957 Fix #761 2016-08-05 18:06:37 +08:00
Syrone Wong b1f5c68650 Fix typo (found by codespell) (#753)
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-03 06:50:43 -05:00
Max Lv 34b9036b5b Add MTU option 2016-08-03 11:53:28 +08:00
Max Lv 658703a1bd Fix #673 2016-06-12 09:09:03 +08:00
Max Lv bb50fc22ca Add option for binding to address #626 2016-05-06 14:52:33 +08:00
Max Lv 04cd8884c0 Fix a typo 2016-05-06 14:08:53 +08:00
Max Lv 41d93b126a Fix #626 2016-05-06 13:23:18 +08:00
Kim 08f873adc7 Roll up year to 2016 2016-04-22 22:50:26 +08:00
Kim c9098f40a5 Add friendly IP_TRANSPARENT fatal message 2016-04-21 14:54:17 +08:00
Max Lv 114128668c Refine helper functions 2016-04-16 00:43:27 +08:00
Syrone Wong ebe79bbbd8 Refine memory management (#579)
- Added one macro to avoid dangling pointers
- Added two functions to perform NULL pointer check
  since the allocation is not guaranteed by C library, although it
  is a rare case, just for sanity
- Add NULL pointer check to brealloc() and bfree() and for sanity as well

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-15 09:16:38 -07:00
Syrone Wong 06d92c923c compare port as well
The whole remote_ctx is inserted into the cache and sockaddr_storage contains
both address and port.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-15 08:34:35 -07:00
H2NCH2COOH 43fde8d39c Fix bug for ss-server udp sendto_remote error (#578) 2016-04-09 20:00:15 -07:00
H2NCH2COOH 117ddf4f33 Fix bug for ss-server when udp is sent with host not ip 2016-04-09 08:06:51 -07: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 da06378915 Clean up 2016-01-31 17:21:44 +08:00
Max Lv 52739f7a14 Refine #495 2015-12-25 14:48:23 +08:00
Max Lv 96690ea08c Merge pull request #496 from kery/issue_495
Fix #495
2015-12-25 14:29:00 +08:00
Kery e73aab26cb Fix #495 2015-12-25 14:12:34 +08:00
Max Lv e921f40aa8 Fix #493 2015-12-25 09:18:53 +08:00
Max Lv d2ef245a05 Refine buffer allocation (2) 2015-12-13 10:57:55 +08:00
Max Lv 1164dc28ca fix a typo for #474 2015-12-09 17:53:37 +08:00
Max Lv eccc91d711 Refine ACL support 2015-12-03 14:18:29 +08:00
Max Lv b0600a8784 Refine buffer handling 2015-11-30 15:03:04 +08:00
Max Lv f4fa30da5c Refine buffer handling 2015-11-29 20:01:50 +08:00
Max Lv a65c162969 fix a typo 2015-10-29 16:58:28 +08:00
Max Lv 25c575cb78 clean up 2015-10-29 15:41:36 +08:00
Max Lv 6d52f0a200 refine the header length check 2015-10-29 15:33:28 +08:00
Max Lv 03ac9aa618 remove the error log of incomplete udp packet 2015-10-29 14:42:55 +08:00
Max Lv c1959cac7f refine the log 2015-10-29 14:35:48 +08:00
Max Lv 032c609c4d truncate HMAC-SHA1 to 10 bytes 2015-09-24 17:46:46 +08:00
Max Lv 5292700bbc update documents 2015-09-24 12:08:12 +08:00
Max Lv 8d46ced3c9 fix auth in udprelay 2015-09-24 11:00:13 +08:00
Max Lv c1db81d7db fix a buffer overflow 2015-09-23 22:34:45 +08:00
Max Lv 0e79c93ad1 add auth to udprelay 2015-09-23 22:15:59 +08:00
Max Lv a2e4c02da2 fix a typo 2015-09-13 14:15:41 +08:00
Max Lv 226cfa2973 tune udp conn pool size 2015-09-09 09:05:42 +08:00
Max Lv 491d22f7a8 remove md5 in conn cache 2015-08-30 11:55:08 +08:00
Max Lv a50e00c240 refine conn cache 2015-08-30 11:03:23 +08:00
Max Lv 5f3c2e1256 Add ss-manager for multi-user control and traffic statistics. 2015-08-11 18:57:18 +09:00
Max Lv aaf7284234 avoid protect socket every time 2015-07-31 18:50:30 +08:00
Max Lv 7260153439 add log for possible ip fragmentation 2015-07-31 16:38:25 +08:00
Max Lv b3911fc84f fix a build issue 2015-07-31 13:11:35 +08:00
Max Lv a9f8b2bdfa drop large UDP packets 2015-07-31 10:28:46 +08:00