Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to fill in field 'Plugin Options:' #1813

Closed
john564 opened this issue Apr 14, 2018 · 10 comments
Closed

Question: How to fill in field 'Plugin Options:' #1813

john564 opened this issue Apr 14, 2018 · 10 comments

Comments

@john564
Copy link

john564 commented Apr 14, 2018

Version(release version or AppVeyor link) / 版本(正式版或基于AppVeyor的链接)

4.0.6 But same question with later versions

Cannot get kcptun to work using the Shadowsocks windows plugin GUI
I have shadowsocks over kcptun working on windows by running kcptun from cmd.

#####################################################################

The latest GUI for shadowsocks has incorporated plugins
How to fill in Plugin Options ? (please use the kcptun config from below as example)

Plugin : C:\kcptun\client_windows_amd64.exe
Plugin Options :

=======================================================
==While not part of the question, this is how I currently run kcptun from CMD
== running kcptun from cmd
== kcptun config, saved at C:\kcptun\kcptun_config.json

{
"localaddr": ":54321",
"remoteaddr": "185.123.456.789:12345",
"key": "Herekeyok",
"crypt": "salsa20",
"mode": "fast2",
"conn": 6
}

= I download the kcp windows exe, and save e.g.
C:\kcptun\client_windows_amd64.exe

= run
cmd.exe /k C:\kcptun\client_windows_amd64.exe -c C:\kcptun\kcptun_config.json

= also need to make a new instance of shadowsocks to connect to localhost:54321

@celeron533
Copy link
Contributor

celeron533 commented Apr 15, 2018

Currently, the plugin options only set the option string as an environment key-value pair. This requires the plugin program reads specific environment setting.
A possible enhancement which perhaps be implemented to parse CLI arguments to the plugin directly: #1672

@john564
Copy link
Author

john564 commented Apr 15, 2018

Please give a working example, for kcptun and/or simple obfs.
For windows kcptun
Plugin : C:\kcptun\client_windows_amd64.exe
Plugin Options : ????????????

@celeron533
Copy link
Contributor

#1368

@john564
Copy link
Author

john564 commented Apr 16, 2018

Ok, So, am I correct.

It does not work with kcptun
So still need to use old way of running kcptun from cmd ?

It does work with obfs, details

Get obfs-local.exe from
https://github.com/shadowsocks/simple-obfs/releases

Plugin C:\obfs-local.exe
Plugin Options obfs=http;obfs-host=www.bing.com

@chenshaoju
Copy link
Collaborator

I'm confused,Do you have kcptun?
You need use kcptun to use kcptun: https://github.com/shadowsocks/kcptun/

@john564
Copy link
Author

john564 commented Apr 16, 2018

I used
https://github.com/xtaci/kcptun
https://github.com/xtaci/kcptun/releases

Its working fine, by running it from CMD line.
Just wanted to know if I could use it via plugin line option in shadowsocks, it would make it easier.

@chenshaoju
Copy link
Collaborator

Shadowsocks for Windows ONLY support plugins if it's accord with SIP003 , For more info,Please read: shadowsocks/shadowsocks-org#28

@john564
Copy link
Author

john564 commented Apr 16, 2018

#1368
quote

celeron533 commented on Sep 10, 2017
currently kcptun's implementation is not following SIP003. You cannot use it directly.

So, am I correct. It does not work with kcptun
So still need to use old way of running kcptun from cmd ?

@chenshaoju
Copy link
Collaborator

chenshaoju commented Apr 16, 2018

Shadowsocks for Windows SUPPORT kcptun if you get from https://github.com/shadowsocks/kcptun/releases

image

EDIT:
Config should look like this:
image

You need rename client_windows_amd64.exe to kcptun.exe and put to shadowsocks.exe folder or you need change path and filename

If everything correctly, When you selected your server with kcptun, you can see kcptun.exe (or your kcptun filename ) in task manager.
image

@john564
Copy link
Author

john564 commented Apr 16, 2018

thanks, I can confirm its working. Here are my notes.

Get kcptun (client_windows_amd64.exe) from
https://github.com/shadowsocks/kcptun/releases

Does not work with standard kcptun
https://github.com/xtaci/kcptun/releases

Filling in the fields on the Shadowsocks GUI
For Plugin, use path to client_windows_amd64.exe
For Plugin Options, see example below
e.g.
Plugin C:\client_windows_amd64.exe
Plugin Options mode=fast2;key=Herekeyok;crypt=salsa20

also need to make a new instance of shadowsocks to connect to
kcptun server listening port instead of shadowsocks port

e.g.
185.123.456.789:12345
where port 12345 is the kcptun listening port on the server
(not the ss listening port on the server you normally connect to)

EDIT: You can rename client_windows_amd64.exe to kcptun.exe
and put it in the shadowsocks.exe folder. This also works.

Plugin kcptun
Plugin Options mode=fast2;key=Herekeyok;crypt=salsa20


For obfs
Get obfs-local.exe from
https://github.com/shadowsocks/simple-obfs/releases

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, 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)

===================================================
EDIT:
Since 4.0.10 There is a new field called Plugin Arguments, for CLI non SIP003 passing options.
e.g.

Plugin Program C:\client_windows_amd64.exe
Plugin Arguments --key Herekeyok --crypt salsa20 --mode fast2

or

Plugin Program  kcptun
Plugin Arguments -c kcptun_config.json

Comment: kcptun.exe and kcptun_config.json in the shadowsocks.exe folder.

or

Plugin Program  C:\client_windows_amd64.exe
Plugin Arguments -c C:\kcptun\kcptun_config.json

C:\kcptun\kcptun_config.json
{
"key": "Herekeyok",
"crypt": "salsa20",
"mode": "fast2"
}


SIP003

Plugin Program  kcptun
Plugin Options   mode=fast2;key=Herekeyok;crypt=salsa20

or

Plugin Program  C:\client_windows_amd64.exe
Plugin Options   mode=fast2;key=Herekeyok;crypt=salsa20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants