* ss-libev: Introduce mode parameter for start_plugin
Since obfsproxy handles client and server in different ways, no matter
standalone or manged mode, so introduce the mode for start_plugin() to
support obfsproxy.
With more comments added to plugin.h for later developers.
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: Move SS protocol plugin initialization code to start_ss_plugin
Move SS protocol plugin initialization to start_ss_plugin() function, as
the support for obfsproxy will not use that environment.
Also, remove the use of get_current_dir_name() which is a glibc
extension, such macro hack will just make code less readable.
Not to mention it already screw up code folding of vim.
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: Introduce obfsproxy standalone mode support as plugin
Now shadowsocks-libev supports to use obfsproxy as plugin.
Currently we only support to use standalone(proxy) mode of obfsproxy, as
managed mode needs to use SOCKS5 as upstream forward, while ss-libev
doesn't support it yet.
And the output from plugin is just trashed for now.
Support to pipe them into stdout/stderr will be added later.
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: doc: Fix wrong cmdline parameter for plugin options
Command line option for plugin options is "--plugin-opts", not the json
option "--plugin_opts"
Fix it.
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: local: Use enum number for val of long options
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: manager: Use enum number for val of long options
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: redir: Use enum number for val of long options
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: server: Use enum number for val of long options
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* ss-libev: tunnel: Use enum number for val of long options
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* crypto_stream_chacha20_ietf_xor_ic() was first available when libsodium was bumpped to version major 8. Debian jessie still uses major 7 minor 2, so check SODIUM_LIBRARY_VERSION_MAJOR and keep backwards compatibility.
* crypto_stream_chacha20_ietf_xor_ic() was first available when libsodium was bumped to version major 8. Debian jessie still uses major 7 minor 2, so check SODIUM_LIBRARY_VERSION_MAJOR and maintain backward compatibility.
The shared lib file, libsodium.so, could not be found in default share object file path.
The default libsodium.git install files into /usr/local/lib, which is NOT found by system defaults.