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

Add plugin CLI arguments support #1818

Merged
merged 2 commits into from Apr 26, 2018

Conversation

@celeron533
Copy link
Collaborator

commented Apr 17, 2018

per #1672

image

celeron533 added 2 commits Apr 17, 2018
* Add tooltips
* Translations
@celeron533

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 17, 2018

A simple way to test whether it is working or not:

  1. Type cmd as the plugin program
  2. Type anything as the plugin options. Such as pluginoptions
  3. Type /k echo %SS_LOCAL_HOST% %SS_LOCSL_PORT% %SS_REMOTE_HOST% %SS_REMOTE_PORT% %SS_PLUGIN_OPTIONS% > output.txt as the plugin arguments
  4. Save changes. It will call cmd.exe to write the environment variables to file output.txt, which may looks like:
127.0.0.1 5122 11.22.33.44 1234 pluginoptions
@chenshaoju

This comment has been minimized.

Copy link
Collaborator

commented Apr 17, 2018

I'm not sure, but this looks may have a security issue.
In extreme case, may cause the dangerous result like delete all files from the root or running script to download malware etc...

@celeron533

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 18, 2018

Advantages

User could use any plugin which does not follow the SIP003 standard. Currently only a limited number of SIP003 plugins available and some of them are out-of-date from their upstream release.

Disadvantages

As @chenshaoju mentioned,

this looks may have a security issue.

IMO, execute the plugin program already has a kind of risk.

@celeron533 celeron533 merged commit 1c2e135 into shadowsocks:master Apr 26, 2018
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@celeron533 celeron533 deleted the celeron533:CLI branch May 6, 2018
@chenshaoju chenshaoju referenced this pull request May 13, 2018
@chenshaoju

This comment has been minimized.

Copy link
Collaborator

commented Aug 18, 2018

These environment variables only pass by cmd.exe (or shell?)

If use some 3rd non-SIP003 plugin, may not work.

Directly give these environment variables name to the plugin, Most is not working.
image

But if pass by cmd.exe, The cmd.exe will give environment variables value to the plugin, It's will work.
image

It's possible to start cmd.exe first, and give these environment variables to cmd.exe, Let cmd.ext give these value to the plugin?

Or just direct give these value to the plugin in the command line.

#1971

@studentmain studentmain referenced this pull request Aug 19, 2018
3 of 5 tasks complete
celeron533 added a commit that referenced this pull request Aug 19, 2018
Cause: process's additional environment variables are not expanded
by correctly.
celeron533 added a commit to celeron533/shadowsocks-windows that referenced this pull request Aug 19, 2018
Cause: process's additional environment variables are not expanded
by correctly.

Innovated by studentmain (StudentEx <scncgz@gmail.com>)
celeron533 added a commit that referenced this pull request Aug 20, 2018
Fix #1969 #1818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.