Support one-time authentication in ss urls for sharing
This commit implements the new ss protocol proposed here: https://github.com/shadowsocks/shadowsocks-org/issues/16 Also removes a TODO in Server.cs. You are welcome.
This commit is contained in:
@@ -252,7 +252,9 @@ namespace Shadowsocks.Controller
|
||||
|
||||
public static string GetQRCode(Server server)
|
||||
{
|
||||
string parts = server.method + ":" + server.password + "@" + server.server + ":" + server.server_port;
|
||||
string parts = server.method;
|
||||
if (server.auth) parts += "-auth";
|
||||
parts += ":" + server.password + "@" + server.server + ":" + server.server_port;
|
||||
string base64 = Convert.ToBase64String(Encoding.UTF8.GetBytes(parts));
|
||||
return "ss://" + base64;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user