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
8 years ago
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);
^
8 years ago
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
8 years ago
Max Lv
ac5f26c6fa
Fix #585
8 years ago
Max Lv
114128668c
Refine helper functions
8 years ago
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>
8 years ago
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>
8 years ago
Max Lv
da06378915
Clean up
9 years ago
Max Lv
2ac55a4a3f
Reduce the latency of ss-redir
9 years ago
Max Lv
e921f40aa8
Fix #493
9 years ago
Chion Tang
333c47a42a
Add keepalive feature for remote connections
9 years ago
Max Lv
52ff163cd6
Fix a build error
9 years ago
Max Lv
47f984e61c
Refine nofile option
9 years ago
Max Lv
d2ef245a05
Refine buffer allocation (2)
9 years ago
Max Lv
b0600a8784
Refine buffer handling
9 years ago
Max Lv
f4fa30da5c
Refine buffer handling
9 years ago
Max Lv
901457859c
add auth to config
9 years ago
Max Lv
8d46ced3c9
fix auth in udprelay
9 years ago
Max Lv
0e79c93ad1
add auth to udprelay
9 years ago
Max Lv
9f553536cb
Use IV + Chunk id as key of BLAKE2b
9 years ago
Max Lv
552fca1bff
Use one time key for BLAKE2b
9 years ago
Max Lv
d3e43e09a2
Refine the authentication for true CCA
9 years ago
Max Lv
441ac45547
Use one time key for BLAKE2b
9 years ago
Max Lv
1e10661a51
Refine the authentication for true CCA
9 years ago
Max Lv
5ae4df94e4
Update the hash function
9 years ago
Max Lv
53c2900b19
refine onetime auth
9 years ago
Max Lv
5c98a84fdd
refine log
9 years ago
Max Lv
703374cae8
fix a buf issue
9 years ago
Max Lv
2feb417e94
refine log
9 years ago
Max Lv
9e021aa919
add CRC8 for payload authentication
9 years ago
Max Lv
20bc7fa227
fix auth issue of tunnel and redir
9 years ago
Max Lv
656c97e64e
fix auth flag in tunnel and redir
9 years ago
Max Lv
9d2c14b335
encode auth flag in atyp
9 years ago
Max Lv
42ee808681
add onetime authentication
9 years ago
Max Lv
8283e51597
enlarge the default timeout
9 years ago
Max Lv
944e3b2a16
refine the log of TCP only mode
9 years ago
Max Lv
ea9d293abe
add UDP relay only mode
9 years ago
Max Lv
9431b9b0c3
Add TPROXY support for redir mode
9 years ago
JohnnySun
4f45870970
Add try to use /etc/shadowsocks/config.json for ss-redir ss-server ss-tunnel.
10 years ago
Max Lv
b875797839
clean up
10 years ago
Max Lv
116db6c078
bind to 127.0.0.1 by default
10 years ago
Max Lv
e6e75ed6fb
refine output
10 years ago
Max Lv
86b78dedd7
fix potential overflow
10 years ago
Max Lv
726a1b7dd7
clean up
10 years ago
Max Lv
7ee996991f
fix a bug in ss-tunnel
10 years ago
Max Lv
3b07420550
refine tcp_nodelay
10 years ago
Max Lv
411e686106
fix http://www.v2ex.com/t/161515
10 years ago
Max Lv
40e9be0021
Avoid getaddrinfo() in the main loop
10 years ago
Max Lv
e5289e9ba4
Replace libasyncns with libudns
10 years ago
Max Lv
2a15e97196
bump version
10 years ago