Skip to content

Commit

Permalink
解决ss解析报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Tidra committed Mar 5, 2024
1 parent b92e082 commit 4f97b28
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions unit/proxy/ss.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ func explodeSS(ss string) (Proxy, error) {
port = u.Port()
plugins := tool.GetUrlArg(u.RawQuery, "plugin")

var pluginpos = strings.Index(plugins, ";")
plugin = plugins[:pluginpos]
pluginOpts = plugins[pluginpos+1:]
if pluginpos := strings.Index(plugins, ";"); pluginpos > 0 {
plugin = plugins[:pluginpos]
pluginOpts = plugins[pluginpos+1:]
} else {
plugin = plugins
}
// pluginOpts := new(PluginOpts)
// pluginString := strings.ReplaceAll(tool.GetUrlArg(addition, "plugin"), ";", "&")
// switch {
Expand Down

0 comments on commit 4f97b28

Please sign in to comment.