Shadowsocks version / 影梭版本
4.0.10
Environment(Operating system, .NET Framework, etc) / 使用环境(操作系统,.NET Framework等)
win10*64
开发者们,您们好,我想请问下,主程序中的插件参数怎么填?
我在网上可以查到插件程序及插件选项的填法,比如这样:
插件程序:obfs-local
插件选项:obfs=tls;obfs-host=www.bing.com
但是插件参数却没有相应的使用说明,可能是功能是最近才开发出来的,所以网上没有相应的使用说明,故来此请教,烦请告之,谢谢。

好的,谢谢告之,目前符合SIP003规范的插件,仅有 kcptun 及 simple-obf ?
@LYCX2015 而且是改版过的kcptun和simple-obfs
原版的没有SIP003支持
https://github.com/shadowsocks/shadowsocks-windows/issues/1813
For obfs
Get obfs-local.exe from
https://github.com/shadowsocks/simple-obfs/releases
examples (both examples tested and working)
following SIP003 standard to pass parameters
Plugin Program C:\obfs-local.exe
Plugin Options obfs=http;obfs-host=www.bing.com
or
CLI non SIP003 standard
Plugin Program C:\obfs-local.exe
Plugin Arguments --obfs http --obfs-host www.bing.com
Again, remember, need to make a new instance of shadowsocks to connect to the listening port of obfs-server, on the server. (not the ss listening port on the server you normally connect to)
For more help with CLI non SIP003 passing of parameters, see standard help
obfs-local.exe --help
simple-obfs 0.0.5
usage:
obfs-local
--obfs <http|tls> Enable obfuscating: HTTP or TLS (Experimental).
--obfs-host <host_name> Hostname for obfuscating (Experimental).
[-a <user>] Run as another user.
[-f <pid_file>] The file path to store pid.
[-t <timeout>] Socket timeout in seconds.
[-c <config_file>] The path to config file.
[-b <local_address>] Local address to bind.
[--fast-open] Enable TCP fast open with Linux kernel > 3.7.0.
[-v] Verbose mode.
[-h, --help] Print this message.
CLI non SIP003 standard
Plugin Program C:\obfs-local.exe
Plugin Arguments --obfs http --obfs-host www.bing.com
@john564 , you should also add SS_REMOTE_HOST, SS_REMOTE_PORT, SS_LOCAL_HOST, SS_LOCAL_PORT, SS_PLUGIN_OPTIONS when the plugin program does not support SIP003 standard.
Reference: #1672
@celeron533
1) In the shadowsocks GUI (ver 4.0.10), you cannot leave the following fields empty.
Empty "Proxy port" gives error
input string was not in a correct format.
Empty "Server Addr" gives error
Invalid server address
Empty "Server Port" gives error
Illegal port number format
So this data must be entered in the shadowsocks GUI.
"Server Addr" and "Server Port" are the obfs server and port
not shadowsocks server and port
2) trying to put the same data again as arguments does not work
-s %SS_REMOTE_HOST% -p %SS_REMOTE_PORT% -l %SS_LOCAL_PORT% -b %SS_LOCAL_HOST% --obfs http --obfs-host www.bing.com
e.g.
-s 1.2.3.4 -p 1010 -l 1020 -b 127.0.0.1 --obfs http --obfs-host www.bing.com
where
SS_REMOTE_HOST = "Server Addr"
SS_REMOTE_PORT = "Server Port"
SS_LOCAL_HOST = 127.0.0.1
SS_LOCAL_PORT = "Proxy port" (should be something else, but don't know what)
removing data -l SS_LOCAL_PORT -b SS_LOCAL_HOST
then it works.
But -s SS_REMOTE_HOST -p SS_REMOTE_PORT
must use the same values as the GUI "Server Addr" and "Server Port"
so there is no point.
@john564
Please try https://github.com/shadowsocks/shadowsocks-windows/pull/1818#issuecomment-381996176 to check whether the arguments have been sent to the plugin program or not.
How the plugin program handle the arguments (such as, does not support remote port or port occupied) is not in the scope.
@celeron533
all seems ok.
following https://github.com/shadowsocks/shadowsocks-windows/pull/1818#issuecomment-381996176
Note: misspelling, %SS_LOCSL_PORT% should be %SS_LOCAL_PORT%
The returned values of %SS_REMOTE_HOST% %SS_REMOTE_PORT% %SS_LOCAL_HOST% %SS_LOCAL_PORT% %SS_PLUGIN_OPTIONS% are sent to the plugin program from the GUI of shadowsocks,
%SS_LOCAL_PORT% keeps changing to a random value everytime you restart the connection.
Conclusion,
No need to add
SS_REMOTE_HOST, SS_REMOTE_PORT, SS_LOCAL_HOST, SS_LOCAL_PORT, SS_PLUGIN_OPTIONS
into the arguments field. As these variables data already sent from the GUI of shadowsocks.
SS_REMOTE_HOST = "Server Addr" from GUI
SS_REMOTE_PORT = "Server Port" from GUI
SS_LOCAL_HOST = 127.0.0.1
SS_LOCAL_PORT = Random Port, changes every time you restart connection.
SS_PLUGIN_OPTIONS = "Plugin Options" from GUI
Please try 4.1.2
Please try 4.1.2
testing 4.1.2, I did not see any functional changes
what am I suppose to see ?
@john564 4.1.2 has fixed a bug about the Plugin Arguments
And @chenshaoju written a wiki page of how to use Arguments
Thanks, Can confirm its working, Followed this English wiki , and using latest kcptun non-SIP003
https://github.com/shadowsocks/shadowsocks-windows/wiki/Working-with-non-SIP003-standard-Plugin
e.g. works
Plugin Program D:\Shadowsocksplugin_windows_amd64.exe
Plugin Arguments -l %SS_LOCAL_HOST%:%SS_LOCAL_PORT% -r %SS_REMOTE_HOST%:%SS_REMOTE_PORT% --key herekeyok --crypt salsa20 --mode fast2
Most helpful comment
https://github.com/shadowsocks/shadowsocks-windows/issues/1813
For obfs
Get obfs-local.exe from
https://github.com/shadowsocks/simple-obfs/releases
examples (both examples tested and working)
following SIP003 standard to pass parameters
or
CLI non SIP003 standard
Again, remember, need to make a new instance of shadowsocks to connect to the listening port of obfs-server, on the server. (not the ss listening port on the server you normally connect to)
For more help with CLI non SIP003 passing of parameters, see standard help