Added duplicate button to config form.

This commit is contained in:
Logan Zhou
2016-09-18 00:43:45 +08:00
parent 50b601c6e5
commit 333ccb6d1f
5 changed files with 60 additions and 9 deletions
+14 -1
View File
@@ -7,7 +7,7 @@ using Shadowsocks.Controller;
namespace Shadowsocks.Model
{
[Serializable]
public class Server
public class Server: ICloneable
{
public static readonly Regex
UrlFinder = new Regex("^ss://((?:[A-Za-z0-9+/]+)|((?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?))$",
@@ -87,5 +87,18 @@ namespace Shadowsocks.Model
{
return server + ':' + server_port;
}
public object Clone()
{
return new Server
{
server = server,
server_port = server_port,
password = password,
method = method,
remarks = remarks,
auth = auth,
};
}
}
}