Commit Graph
1065 Commits
Author SHA1 Message Date
Max Lv fe22a6c90b Refine error handling of connect() 2016-05-23 12:07:36 +08:00
Max Lv dd90af6651 Fix #638 2016-05-18 14:33:51 +08:00
Max Lv 6d049d0ddb Update README.md 2016-05-18 14:30:13 +08:00
Max Lv de076a7928 Update README.md 2016-05-18 14:27:44 +08:00
Max Lv e0ffe11aa4 Fix dpkg-buildpackage command line 2016-05-17 23:03:08 +09:00
Roger Shimizu cd736d3e94 A few commit recommend for Debian uploading (#636)
* Add Security Hardening

ref: https://wiki.debian.org/Hardening

* Add debian/source/format

* Remove -dbg package

Debug Package is already generated automatically, as -dbgsym package
ref: https://wiki.debian.org/DebugPackage

* Do not include a duplicated changelog into deb package

* Upgrade to policy version 3.9.8

No change is required, based on:
https://www.debian.org/doc/debian-policy/upgrading-checklist.html

* Update configure not to use local libs at all when choosing so
2016-05-17 20:11:05 +08:00
Max Lv be6528cef5 Fix #630 2016-05-08 23:02:15 +08:00
Kim 342bd3f776 Fix ipv6 address format in log message 2016-05-08 17:34:54 +08:00
Kim 285c62b8f3 add option '-b' description into manpage (#628) 2016-05-07 20:56:28 +08:00
Max Lv fd4adca789 Fix #627 2016-05-06 15:36:37 +08:00
Max Lv a73fe213a6 Refine the output 2016-05-06 15:16:27 +08:00
Max Lv e3deb0668d Fix the mismatch types 2016-05-06 15:10:09 +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
Jinjing Wang 7ddcccdd56 Add NixOS and Nix to the TOC section (#620) 2016-05-01 17:39:23 +08:00
Jinjing Wang e361e66fac Add install manual for NixOS and Nix (#616) 2016-05-01 17:03:06 +08:00
Max Lv 72ee77ea35 Fix #615 2016-04-28 10:34:26 +08:00
Zhang Chao 8b4252873a Fix undefined variable bug in Dockerfile. 2016-04-25 07:35:26 +08:00
Syrone Wong 7481ffffc7 clarify encrypt method info
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-04-24 21:25:26 +08:00
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