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

Supports simple-obfs with SIP003 #587

Merged
merged 3 commits into from
Feb 6, 2018
Merged

Supports simple-obfs with SIP003 #587

merged 3 commits into from
Feb 6, 2018

Conversation

timothyqiu
Copy link
Contributor

This PR hopefully resolves #406 and #576

To use simple-obfs, open the Server Preferences window, set the text fields to something like:

  • Plugin: obfs-local
  • Plugin Opts: obfs=http;obfs-host=www.bing.com

I took the prebuilt obfs-local binary from Homebrew bintray. Version 0.0.2 for El Capitan is used because it's the version with ss-local 3.0.5 and README.md says macOS 10.11+ is supported.

Changes to the ~/Library/Application Support/ShadowsocksX-NG directory:

  • simple-obfs-0.0.2/obfs-local will be copied from the main bundle
  • plugins/obfs-local will be a symlink to simple-obfs-0.0.2/obfs-local

Two extra fields are added to ServerProfile: plugin and pluginOptions, they will be serialized to the UserDefaults as Plugin and PluginOptions.

The JSON config will also have plugin and plugin_opts if plugin is not empty. The plugin field in JSON config will have a plugins prefix (i.e. plugins/obfs-local if plugin is set to obfs-local). This is required since ss-local only searches for the plugin in PATH.

The SIP002 QR code can be scanned correctly by the latest Android Shadowsocks client.


Something that can be fixed / done in the future:

  • Some better way of allowing the user to add plugins. (Currently, users have to symlink their executable to the plugins directory.)
  • Maybe some way of removing the ugly plugins/ prefix to the plugin config?
  • Maybe the legacy QR code needs to include plugin information?

@Kaijun
Copy link

Kaijun commented Nov 2, 2017

Good Job!

@bzdk
Copy link

bzdk commented Nov 2, 2017

thank you @timothyqiu

@ortonomy
Copy link

ortonomy commented Nov 2, 2017

@timothyqiu -- BAD ASS!

@g3org3z
Copy link

g3org3z commented Jan 28, 2018

@timothyqiu Thanks! Is it possible for you to provide the compiled dmg version on your git page?

@ortonomy
Copy link

Did this ever get merged?

@maxming2333
Copy link

life time~

@ortonomy
Copy link

@timothyqiu -- did you consider requesting the repo admin to review? He's not been requested.

@timothyqiu
Copy link
Contributor Author

@ortonomy I thought creating a pull request without saying "WIP" means requesting review... 😅

Anyway, recent commits in the develop branch made this PR unmergeable. I just rebased this PR to the latest develop branch and resolved the conflicts.

@qiuyuzhou Please review.

@g3org3z
Copy link

g3org3z commented Jan 29, 2018

@timothyqiu Thanks for requesting the review. The latest Obfs plugin version was 0.05. Do you think it's necessary to update it to 0.05? I looked through it briefly and it seemed like the differences were a failover option and multiple bug fixes.

@timothyqiu
Copy link
Contributor Author

@g3org3z I think 0.0.2 may be better because the ss-local bundled with SSX-NG is still 3.0.5. As noted in the PR description, simple-obfs 0.0.2 kind of matches ss-local 3.0.5 considering the release dates.

There's also another consideration: ss-local introduced several extra library dependencies in releases after version 3.0.5, so did simple-obfs 0.0.3+. These new dependencies are almost the same, and are used to implement similar features (IIRC, they are something related to the DNS). So I think it may be better to add these dependencies when upgrading both ss-local and simple-obfs.

@maxming2333
Copy link

@timothyqiu 有 dmg 输出么,貌似这里都不维护了,作者都不管

@g3org3z
Copy link

g3org3z commented Feb 3, 2018

@maxming2333 Here you go.
https://github.com/g3org3z/ShadowsocksX-NG/releases/tag/v1.7.0-beta

@maxming2333
Copy link

thx

@qiuyuzhou qiuyuzhou merged commit 6fd1c39 into shadowsocks:develop Feb 6, 2018
@timothyqiu timothyqiu deleted the simple-obfs branch March 15, 2018 12:37
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

Successfully merging this pull request may close these issues.

Integrate support for plugin simple-obfs
7 participants