Commit Graph
1045 Commits
Author SHA1 Message Date
Kim 08f873adc7 Roll up year to 2016 2016-04-22 22:50:26 +08:00
Kim b3b522fd5e Fix missing leading space in macro LOGI() 2016-04-22 22:38:51 +08:00
Kim 62f0044603 Clearfied the -i option in man pages
* updated interface binding description in man page

* typo

* fixed description of -i option
2016-04-22 19:54:24 +08:00
Syrone Wong 0bbf6c36a7 use sodium_memzero() to clear sensitive data
Close #603

After use, sensitive data should be overwritten, but memset() and hand-written code can be silently stripped out by an optimizing compiler or by the linker.

The sodium_memzero() function tries to effectively zero len bytes starting at pnt, even if optimizations are being applied to the code.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-22 18:00:19 +08:00
ahxxm fd82c92b04 bump version of alpine dockerfile (#604) 2016-04-22 16:32:12 +08:00
Max Lv d03d71c8c1 Bump version v2.4.6 2016-04-22 15:08:31 +08:00
Kim 3753fc53f7 Add friendly IP_TRANSPARENT fatal message [part #2]
* updated friendly IP_TRANSPARENT fatal message

* updated man page
2016-04-21 15:34:57 +08:00
Kim c9098f40a5 Add friendly IP_TRANSPARENT fatal message 2016-04-21 14:54:17 +08:00
Kim dfa9e17c1b Add help option
* updated cli option 'help'

- all 5 apps supports cli option '-h' without error exit code
- supports long option '--help'

* fixed bad line brake
2016-04-21 06:22:58 +08:00
Kim 4e41126015 Update manpage
* fixed 80 chars width of man page

* fixed default timeout value documented in man page

* fixed terms should be highlighted

* updated options '-w' into man pages

* reordered '-a' in front of '-f' in man page

according to the app's help message, the option '-a' should be  in front of '-f'

* updated man page '-n nofile' => '-n number'

* updated date in man page

* updated man page

* updated man page according to the source code

- removed -l from ss-server's man page
- removed -p, -l, -b from ss-manager's man page
- added -d, --fast-open, --acl into ss-manager's man page

* updated option '-w' in man page
2016-04-20 10:14:19 +08:00
YumeMichi ebf24c1c01 Fix compile on 32-bit machine (#593)
redir.c:212:9: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘ssize_t’ [-Werror=format=]
         LOGI("redir to %s:%d, len=%ld", ipstr, port, r);
         ^
2016-04-19 15:52:07 +08:00
Kim 3e0952de52 Refine verbose output in redir mode
* fix `ss-redir -v`.

It's now output messages while redirecting.
This is useful at the time building up a router.

* typo

* inet_ntop() -> dns_ntop()

* removed max().

max(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) => INET6_ADDRSTRLEN
2016-04-19 14:05:12 +08:00
Max Lv 6c2c49ad60 Fix #586 2016-04-17 20:03:36 +08:00
Max Lv ac5f26c6fa Fix #585 2016-04-17 19:38:10 +08:00
Max Lv 8701f1dc65 Add missing headers 2016-04-16 01:02:12 +08:00
Max Lv 2363acf1f7 Fix a typo 2016-04-16 00:58:13 +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 446e570b7d libudns: add definition to enable IPv6 support
This is an option in the origin configure script, add this to configure.ac to generate
config.h since submodules are sharing the same file.

All checks needed are guaranteed, thus simply add it to the ending of file.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-15 08:36:29 -07:00
Syrone Wong 53c6a09b93 Reset errno to 0 before checking it
errno is never set to zero by any system call or library function,
and it's programmer's resposibility to reset it before doing checks.
Otherwise the error might be misleading.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-15 08:35:16 -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 86aeb31229 Merge pull request #567 from vizv/fix-dockerfile
Update docker related files.
2016-03-21 10:04:32 -05:00
Wenxuan Zhao 71afe284cb Update docker related files.
+ expose UDP port
* bump up server version to 2.4.5.
2016-03-21 11:23:15 -03:00
Max Lv ce0561a999 Fix #560 2016-03-14 09:50:59 +08:00
Max Lv 6b09dd4b9f Fix #559 2016-03-13 13:12:08 +08:00
Max Lv 8539acd28f Merge pull request #487 from Chion82/master
Enable TCP keep-alive feature for remote connections
2016-03-11 12:05:48 +08:00
Max Lv 2001c5fe71 Merge pull request #549 from pjrobertson/ppa
Update README on PPA not always being the latest version
2016-03-04 07:42:02 +08:00
Patrick Robertson 77334d9410 Update README on PPA not being maintained 2016-03-04 07:28:28 +08:00
Max Lv 19efe272a0 Merge pull request #547 from shao222/patch-1
Update README.md
2016-03-02 11:57:42 +08:00
shao222 29dd62ae15 Update README.md 2016-03-02 11:50:51 +08:00
Max Lv be54931c43 Merge pull request #542 from echizenryoma/patch-1
update version to 2.4.5
2016-02-18 10:40:48 +08:00
Echizen Ryoma 0e1ca9c25d update version to 2.4.5 2016-02-18 09:56:48 +08:00
Max Lv 3a0c6a1919 Update changelog v2.4.5 2016-02-01 14:32:56 +08:00
Max Lv 0dc9853ece Bump version 2016-02-01 13:24:29 +08:00
Max Lv 6d5415eb9a Disable ssp for OpenWRT 2016-02-01 13:14:21 +08:00
Max Lv 682aabca04 Fix #533 2016-02-01 13:07:14 +08:00
Max Lv 4be34cbd82 Fix #533 2016-02-01 12:26:55 +08:00
Max Lv da06378915 Clean up 2016-01-31 17:21:44 +08:00
Max Lv 2ac55a4a3f Reduce the latency of ss-redir 2016-01-26 10:40:23 +08:00
Max Lv e669a3a37c reset peer_name 2016-01-26 09:48:33 +08:00
Max Lv 0d64f11f47 Fix typo 2016-01-24 17:18:09 +08:00
Max Lv dbe1e01074 Add prefix option for Android 2016-01-24 16:32:37 +08:00
Max Lv c088e46292 Merge pull request #529 from vimagick/master
fix wrong URLs in docker/alpine/README.md
2016-01-20 21:19:19 +08:00
kev add300ecf1 fix wrong URLs in docker/alpine/README.md 2016-01-20 21:14:12 +08:00
Max Lv c6f091856d Merge pull request #528 from vimagick/master
add Dockerfile based on alpine
2016-01-20 21:01:30 +08:00
kev 958d856117 add Dockerfile based on alpine 2016-01-20 20:51:59 +08:00