Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e84825c25d | ||
|
|
05726cdb67 | ||
|
|
ab38538b34 | ||
|
|
4f92fabc88 | ||
|
|
9522d1d17b | ||
|
|
36c61b7dd5 | ||
|
|
90f8b1257a | ||
|
|
7978817492 | ||
|
|
1b8584e6e1 | ||
|
|
9085480d0b | ||
|
|
23b90b8697 | ||
|
|
2449d2a5df |
@@ -7,32 +7,30 @@ Shadowsocks for Windows
|
||||
|
||||
1. System proxy configuration
|
||||
2. PAC mode and global mode
|
||||
3. GFWList and user rules
|
||||
3. [GFWList] and user rules
|
||||
4. Supports HTTP proxy
|
||||
5. Supports server auto switching
|
||||
6. Supports UDP relay (see Usage)
|
||||
|
||||
#### Download
|
||||
|
||||
Download a [latest release].
|
||||
|
||||
Notice: .Net 2.0 doesn't work well on Windows 10. We no longer support .Net 2.0. Both Shadowsocks-win-xxx.zip and Shadowsocks-win-dotnet4.0-xxx.zip are exactly the same file now. If you use Windows XP or 7, please install .Net 4.0 or higher.
|
||||
Download the [latest release].
|
||||
|
||||
#### Basic
|
||||
|
||||
1. Find Shadowsocks icon in the notification tray
|
||||
2. You can add multiple servers in servers menu
|
||||
3. Select Enable System Proxy menu to enable system proxy. Please disable other
|
||||
3. Select `Enable System Proxy` menu to enable system proxy. Please disable other
|
||||
proxy addons in your browser, or set them to use system proxy
|
||||
4. You can also configure your browser proxy manually if you don't want to enable
|
||||
system proxy. Set Socks5 or HTTP proxy to 127.0.0.1:1080. You can change this
|
||||
port in Server -> Edit Servers
|
||||
port in `Servers -> Edit Servers`
|
||||
|
||||
#### PAC
|
||||
|
||||
1. You can change PAC rules by editing the PAC file. When you save the PAC file
|
||||
with any editor, Shadowsocks will notify browsers about the change automatically
|
||||
2. You can also update PAC file from GFWList (maintained by 3rd party)
|
||||
2. You can also update PAC file from [GFWList] (maintained by 3rd party)
|
||||
3. You can also use online PAC URL
|
||||
|
||||
#### Server Auto Switching
|
||||
@@ -46,7 +44,7 @@ with any editor, Shadowsocks will notify browsers about the change automatically
|
||||
#### UDP
|
||||
|
||||
For UDP, you need to use SocksCap or ProxyCap to force programs you want
|
||||
to proxy to tunnel over Shadowsocks
|
||||
to be proxied to tunnel over Shadowsocks
|
||||
|
||||
#### Develop
|
||||
|
||||
@@ -60,3 +58,4 @@ GPLv3
|
||||
[Appveyor]: https://ci.appveyor.com/project/clowwindy/shadowsocks-csharp
|
||||
[Build Status]: https://ci.appveyor.com/api/projects/status/gknc8l1lxy423ehv/branch/master
|
||||
[latest release]: https://github.com/shadowsocks/shadowsocks-csharp/releases
|
||||
[GFWList]: https://github.com/gfwlist/gfwlist
|
||||
|
||||
@@ -67,14 +67,21 @@ namespace Shadowsocks.Controller
|
||||
string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
//ICMP echo. we can also set options and special bytes
|
||||
//seems no need to use SendPingAsync
|
||||
PingReply reply = ping.Send(server.server, Timeout);
|
||||
state.data = new List<KeyValuePair<string, string>>();
|
||||
state.data.Add(new KeyValuePair<string, string>("Timestamp", timestamp));
|
||||
state.data.Add(new KeyValuePair<string, string>("Server", server.FriendlyName()));
|
||||
state.data.Add(new KeyValuePair<string, string>("Status", reply.Status.ToString()));
|
||||
state.data.Add(new KeyValuePair<string, string>("RoundtripTime", reply.RoundtripTime.ToString()));
|
||||
//state.data.Add(new KeyValuePair<string, string>("data", reply.Buffer.ToString())); // The data of reply
|
||||
Append(state.data);
|
||||
try
|
||||
{
|
||||
PingReply reply = ping.Send(server.server, Timeout);
|
||||
state.data = new List<KeyValuePair<string, string>>();
|
||||
state.data.Add(new KeyValuePair<string, string>("Timestamp", timestamp));
|
||||
state.data.Add(new KeyValuePair<string, string>("Server", server.FriendlyName()));
|
||||
state.data.Add(new KeyValuePair<string, string>("Status", reply.Status.ToString()));
|
||||
state.data.Add(new KeyValuePair<string, string>("RoundtripTime", reply.RoundtripTime.ToString()));
|
||||
//state.data.Add(new KeyValuePair<string, string>("data", reply.Buffer.ToString())); // The data of reply
|
||||
Append(state.data);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logging.LogUsefulException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,10 +65,13 @@ namespace Shadowsocks.Controller
|
||||
polipoConfig = polipoConfig.Replace("__POLIPO_BIND_IP__", configuration.shareOverLan ? "0.0.0.0" : "127.0.0.1");
|
||||
FileManager.ByteArrayToFile(temppath + "/privoxy.conf", System.Text.Encoding.UTF8.GetBytes(polipoConfig));
|
||||
|
||||
if (!(temppath.EndsWith("\\") || temppath.EndsWith("/"))) {
|
||||
temppath = temppath + "\\";
|
||||
}
|
||||
_process = new Process();
|
||||
// Configure the process using the StartInfo properties.
|
||||
_process.StartInfo.FileName = temppath + "/ss_privoxy.exe";
|
||||
_process.StartInfo.Arguments = " \"" + temppath + "/privoxy.conf\"";
|
||||
_process.StartInfo.FileName = temppath + "ss_privoxy.exe";
|
||||
_process.StartInfo.Arguments = " \"" + temppath + "privoxy.conf\"";
|
||||
_process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
_process.StartInfo.UseShellExecute = true;
|
||||
_process.StartInfo.CreateNoWindow = true;
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace Shadowsocks.Controller
|
||||
{
|
||||
public class UpdateChecker
|
||||
{
|
||||
private const string UpdateURL = "https://api.github.com/repos/shadowsocks/shadowsocks-csharp/releases";
|
||||
private const string UpdateURL = "https://api.github.com/repos/shadowsocks/shadowsocks-windows/releases";
|
||||
|
||||
public string LatestVersionNumber;
|
||||
public string LatestVersionURL;
|
||||
public event EventHandler NewVersionFound;
|
||||
|
||||
public const string Version = "2.5.4";
|
||||
public const string Version = "2.5.5";
|
||||
|
||||
public void CheckUpdate(Configuration config)
|
||||
{
|
||||
|
||||
@@ -56,18 +56,14 @@ namespace Shadowsocks.Controller
|
||||
pacUrl = "http://127.0.0.1:" + config.localPort.ToString() + "/pac?t=" + GetTimestamp(DateTime.Now);
|
||||
registry.SetValue("ProxyEnable", 0);
|
||||
var readProxyServer = registry.GetValue("ProxyServer");
|
||||
if (readProxyServer != null && readProxyServer.Equals("127.0.0.1:" + config.localPort.ToString()))
|
||||
registry.SetValue("ProxyServer", "");
|
||||
registry.SetValue("ProxyServer", "");
|
||||
registry.SetValue("AutoConfigURL", pacUrl);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
registry.SetValue("ProxyEnable", 0);
|
||||
if (global)
|
||||
{
|
||||
registry.SetValue("ProxyServer", "");
|
||||
}
|
||||
registry.SetValue("ProxyServer", "");
|
||||
registry.SetValue("AutoConfigURL", "");
|
||||
}
|
||||
//Set AutoDetectProxy Off
|
||||
|
||||
@@ -19,6 +19,7 @@ Update Local PAC from GFWList=从 GFWList 更新本地 PAC
|
||||
Edit User Rule for GFWList...=编辑 GFWList 的用户规则...
|
||||
Show QRCode...=显示二维码...
|
||||
Scan QRCode from Screen...=扫描屏幕上的二维码...
|
||||
Availability Statistics=统计可用性
|
||||
Show Logs...=显示日志...
|
||||
About...=关于...
|
||||
Quit=退出
|
||||
@@ -72,6 +73,9 @@ Failed to update PAC file =更新 PAC 文件失败
|
||||
PAC updated=更新 PAC 成功
|
||||
No updates found. Please report to GFWList if you have problems with it.=未发现更新。如有问题请提交给 GFWList。
|
||||
No QRCode found. Try to zoom in or move it to the center of the screen.=未发现二维码,尝试把它放大或移动到靠近屏幕中间的位置
|
||||
Shadowsocks is already running.=Shadowsocks 已经在运行。
|
||||
Find Shadowsocks icon in your notify tray.=请在任务栏里寻找 Shadowsocks 图标。
|
||||
If you want to start multiple Shadowsocks, make a copy in another directory.=如果想启动多份,可以另外复制一份到别的目录。
|
||||
Failed to decode QRCode=无法解析二维码
|
||||
Failed to update registry=无法修改注册表
|
||||
System Proxy On: =系统代理已启用:
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Shadowsocks
|
||||
static void Main()
|
||||
{
|
||||
Util.Utils.ReleaseMemory();
|
||||
using (Mutex mutex = new Mutex(false, "Global\\" + "71981632-A427-497F-AB91-241CD227EC1F"))
|
||||
using (Mutex mutex = new Mutex(false, "Global\\Shadowsocks_" + Application.StartupPath.GetHashCode()))
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
@@ -31,7 +31,9 @@ namespace Shadowsocks
|
||||
{
|
||||
Process oldProcess = oldProcesses[0];
|
||||
}
|
||||
MessageBox.Show("Shadowsocks is already running.\n\nFind Shadowsocks icon in your notify tray.");
|
||||
MessageBox.Show(I18N.GetString("Find Shadowsocks icon in your notify tray.") + "\n" +
|
||||
I18N.GetString("If you want to start multiple Shadowsocks, make a copy in another directory."),
|
||||
I18N.GetString("Shadowsocks is already running."));
|
||||
return;
|
||||
}
|
||||
Directory.SetCurrentDirectory(Application.StartupPath);
|
||||
|
||||
Reference in New Issue
Block a user