mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-04-19 17:10:56 +00:00
commit
09062aa0c4
48 changed files with 932 additions and 302 deletions
|
@ -33,5 +33,13 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
return DateTime.Now.Ticks.ToString();
|
||||
}
|
||||
|
||||
private static Random random = new Random();
|
||||
public static string RandomString(int length)
|
||||
{
|
||||
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
return new string(Enumerable.Repeat(chars, length)
|
||||
.Select(s => s[random.Next(s.Length)]).ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
35
ProxySuper.Core/Models/Projects/BrookSettings.cs
Normal file
35
ProxySuper.Core/Models/Projects/BrookSettings.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProxySuper.Core.Models.Projects
|
||||
{
|
||||
public class BrookSettings : IProjectSettings
|
||||
{
|
||||
public string Domain { get; set; }
|
||||
|
||||
public string Password { get; set; }
|
||||
|
||||
public BrookType BrookType { get; set; }
|
||||
|
||||
public int Port { get; set; } = 443;
|
||||
|
||||
public List<int> FreePorts
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<int>()
|
||||
{
|
||||
Port
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public string Email => "server@brook.com";
|
||||
|
||||
public ProjectType Type { get; set; } = ProjectType.Brook;
|
||||
|
||||
}
|
||||
}
|
15
ProxySuper.Core/Models/Projects/BrookType.cs
Normal file
15
ProxySuper.Core/Models/Projects/BrookType.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProxySuper.Core.Models.Projects
|
||||
{
|
||||
public enum BrookType
|
||||
{
|
||||
server,
|
||||
wsserver,
|
||||
wssserver
|
||||
}
|
||||
}
|
|
@ -27,5 +27,10 @@ namespace ProxySuper.Core.Models.Projects
|
|||
/// 类型
|
||||
/// </summary>
|
||||
ProjectType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
string Email { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -26,5 +27,24 @@ namespace ProxySuper.Core.Models.Projects
|
|||
public string Password { get; set; }
|
||||
|
||||
public string MaskDomain { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string Email
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Domain))
|
||||
{
|
||||
var arr = Domain.Split('.');
|
||||
if (arr.Length == 3)
|
||||
{
|
||||
return $"{arr[0]}@{arr[1]}.{arr[2]}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $"{UserName + Port.ToString()}@gmail.com";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace ProxySuper.Core.Models.Projects
|
|||
{
|
||||
Xray = 0,
|
||||
TrojanGo = 1,
|
||||
NaiveProxy = 2
|
||||
NaiveProxy = 2,
|
||||
Brook = 3,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace ProxySuper.Core.Models.Projects
|
|||
{
|
||||
Port = 443;
|
||||
WebSocketPath = "/ws";
|
||||
Password = Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
public List<int> FreePorts
|
||||
|
@ -63,5 +64,25 @@ namespace ProxySuper.Core.Models.Projects
|
|||
/// </summary>
|
||||
public string WebSocketPath { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public string Email
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Domain))
|
||||
{
|
||||
var arr = Domain.Split('.');
|
||||
if (arr.Length == 3)
|
||||
{
|
||||
return $"{arr[0]}@{arr[1]}.{arr[2]}";
|
||||
}
|
||||
}
|
||||
|
||||
var prefix = Password.Length > 7 ? Password.Substring(0, 7) : Password;
|
||||
return $"{prefix}@gmail.com";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using ProxySuper.Core.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -20,13 +22,13 @@ namespace ProxySuper.Core.Models.Projects
|
|||
UUID = guid;
|
||||
Types = new List<XrayType>();
|
||||
|
||||
VLESS_WS_Path = "/vlessws";
|
||||
VLESS_WS_Path = "/" + Utils.RandomString(6);
|
||||
VLESS_KCP_Type = "none";
|
||||
VLESS_KCP_Seed = guid;
|
||||
VLESS_gRPC_ServiceName = "xray_gRPC";
|
||||
VLESS_gRPC_ServiceName = "/" + Utils.RandomString(7);
|
||||
|
||||
VMESS_WS_Path = "/vmessws";
|
||||
VMESS_TCP_Path = "/vmesstcp";
|
||||
VMESS_WS_Path = "/" + Utils.RandomString(8);
|
||||
VMESS_TCP_Path = "/" + Utils.RandomString(9);
|
||||
VMESS_KCP_Seed = guid;
|
||||
VMESS_KCP_Type = "none";
|
||||
|
||||
|
@ -40,12 +42,28 @@ namespace ProxySuper.Core.Models.Projects
|
|||
{
|
||||
get
|
||||
{
|
||||
return new List<int>
|
||||
var list = new List<int>();
|
||||
if (Types.Contains(XrayType.VLESS_KCP))
|
||||
{
|
||||
VLESS_KCP_Port,
|
||||
VMESS_KCP_Port,
|
||||
ShadowSocksPort,
|
||||
};
|
||||
list.Add(VLESS_KCP_Port);
|
||||
}
|
||||
|
||||
if (Types.Contains(XrayType.VMESS_KCP))
|
||||
{
|
||||
list.Add(VMESS_KCP_Port);
|
||||
}
|
||||
|
||||
if (Types.Contains(XrayType.ShadowsocksAEAD))
|
||||
{
|
||||
list.Add(ShadowSocksPort);
|
||||
}
|
||||
|
||||
if (Types.Contains(XrayType.VLESS_gRPC))
|
||||
{
|
||||
list.Add(VLESS_gRPC_Port);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,11 +84,34 @@ namespace ProxySuper.Core.Models.Projects
|
|||
/// </summary>
|
||||
public string UUID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 多用户
|
||||
/// </summary>
|
||||
public List<string> MulitUUID { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 伪装域名
|
||||
/// </summary>
|
||||
public string MaskDomain { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string Email
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Domain))
|
||||
{
|
||||
var arr = Domain.Split('.');
|
||||
if (arr.Length == 3)
|
||||
{
|
||||
return $"{arr[0]}@{arr[1]}.{arr[2]}";
|
||||
}
|
||||
}
|
||||
|
||||
return $"{UUID.Substring(2, 6)}@gmail.com";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 安装类型
|
||||
/// </summary>
|
||||
|
|
|
@ -53,6 +53,9 @@ namespace ProxySuper.Core.Models
|
|||
[JsonProperty("naiveProxySettings")]
|
||||
public NaiveProxySettings NaiveProxySettings { get; set; }
|
||||
|
||||
[JsonProperty("brook")]
|
||||
public BrookSettings BrookSettings { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public ProjectType Type
|
||||
|
@ -63,7 +66,9 @@ namespace ProxySuper.Core.Models
|
|||
|
||||
if (TrojanGoSettings != null) return ProjectType.TrojanGo;
|
||||
|
||||
return ProjectType.NaiveProxy;
|
||||
if (NaiveProxySettings != null) return ProjectType.NaiveProxy;
|
||||
|
||||
return ProjectType.Brook;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,8 @@
|
|||
<Compile Include="Models\Hosts\Host.cs" />
|
||||
<Compile Include="Models\Hosts\LocalProxyType.cs" />
|
||||
<Compile Include="Models\Hosts\LoginSecretType.cs" />
|
||||
<Compile Include="Models\Projects\BrookSettings.cs" />
|
||||
<Compile Include="Models\Projects\BrookType.cs" />
|
||||
<Compile Include="Models\Projects\IProjectSettings.cs" />
|
||||
<Compile Include="Models\Hosts\LocalProxy.cs" />
|
||||
<Compile Include="Models\Projects\NaiveProxySettings.cs" />
|
||||
|
@ -84,6 +86,7 @@
|
|||
<Compile Include="Models\Record.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Helpers\Utils.cs" />
|
||||
<Compile Include="Services\BrookProject.cs" />
|
||||
<Compile Include="Services\NaiveProxyProject.cs" />
|
||||
<Compile Include="Services\ProjectBase.cs" />
|
||||
<Compile Include="Services\ShareLink.cs" />
|
||||
|
@ -91,6 +94,7 @@
|
|||
<Compile Include="Services\TrojanGoProject.cs" />
|
||||
<Compile Include="Services\XrayConfigBuilder.cs" />
|
||||
<Compile Include="Services\XrayProject.cs" />
|
||||
<Compile Include="ViewModels\BrookEditorViewModel.cs" />
|
||||
<Compile Include="ViewModels\HomeViewModel.cs" />
|
||||
<Compile Include="ViewModels\NaiveProxyConfigViewModel.cs" />
|
||||
<Compile Include="ViewModels\NaiveProxyEditorViewModel.cs" />
|
||||
|
|
112
ProxySuper.Core/Services/BrookProject.cs
Normal file
112
ProxySuper.Core/Services/BrookProject.cs
Normal file
|
@ -0,0 +1,112 @@
|
|||
using ProxySuper.Core.Models.Projects;
|
||||
using Renci.SshNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProxySuper.Core.Services
|
||||
{
|
||||
public class BrookProject : ProjectBase<BrookSettings>
|
||||
{
|
||||
public BrookProject(SshClient sshClient, BrookSettings parameters, Action<string> writeOutput) : base(sshClient, parameters, writeOutput)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Install()
|
||||
{
|
||||
|
||||
WriteOutput("检测安装系统环境...");
|
||||
EnsureSystemEnv();
|
||||
WriteOutput("检测安装系统环境完成");
|
||||
|
||||
WriteOutput("配置服务器端口...");
|
||||
ConfigurePort();
|
||||
WriteOutput("端口配置完成");
|
||||
|
||||
WriteOutput("安装必要的系统工具...");
|
||||
ConfigureSoftware();
|
||||
WriteOutput("系统工具安装完成");
|
||||
|
||||
WriteOutput("检测IP6...");
|
||||
ConfigureIPv6();
|
||||
WriteOutput("检测IP6完成");
|
||||
|
||||
WriteOutput("配置防火墙...");
|
||||
ConfigureFirewall();
|
||||
WriteOutput("防火墙配置完成");
|
||||
|
||||
if (Parameters.BrookType == BrookType.wssserver)
|
||||
{
|
||||
WriteOutput("检测域名是否绑定本机IP...");
|
||||
ValidateDomain();
|
||||
WriteOutput("域名检测完成");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void InstallBrook()
|
||||
{
|
||||
Console.WriteLine("安装nami");
|
||||
RunCmd("source <(curl -L https://git.io/getnami)");
|
||||
Console.WriteLine("安装nami完成");
|
||||
|
||||
Console.WriteLine("安装Brook");
|
||||
RunCmd("echo y | nami install github.com/txthinking/brook");
|
||||
Console.WriteLine("安装Brook完成");
|
||||
|
||||
Console.WriteLine("安装joker");
|
||||
RunCmd("echo y | nami install github.com/txthinking/joker");
|
||||
Console.WriteLine("安装joker完成");
|
||||
|
||||
Console.WriteLine("安装jinbe");
|
||||
RunCmd("echo y | nami install github.com/txthinking/jinbe");
|
||||
Console.WriteLine("安装jinbe完成");
|
||||
|
||||
|
||||
var runBrookCmd = string.Empty;
|
||||
|
||||
if (Parameters.BrookType == BrookType.server)
|
||||
{
|
||||
runBrookCmd = $"joker brook server --listen :{Parameters.Port} --password {Parameters.Password}";
|
||||
}
|
||||
|
||||
if (Parameters.BrookType == BrookType.wsserver)
|
||||
{
|
||||
runBrookCmd = $"joker brook wsserver --listen :{Parameters.Port} --password {Parameters.Password}";
|
||||
}
|
||||
|
||||
if (Parameters.BrookType == BrookType.wsserver)
|
||||
{
|
||||
runBrookCmd = $"joker brook wssserver --domain {Parameters.Domain} --password {Parameters.Password}";
|
||||
}
|
||||
|
||||
RunCmd("jinbe " + runBrookCmd);
|
||||
|
||||
Console.WriteLine("*************安装完成,尽情享用吧**********");
|
||||
}
|
||||
|
||||
public void Uninstall()
|
||||
{
|
||||
RunCmd("jinbe remove 0");
|
||||
RunCmd("killall joker");
|
||||
|
||||
Console.WriteLine("卸载jinbe");
|
||||
RunCmd("echo y | nami remove github.com/txthinking/jinbe");
|
||||
|
||||
Console.WriteLine("卸载joker");
|
||||
RunCmd("echo y | nami remove github.com/txthinking/joker");
|
||||
|
||||
Console.WriteLine("卸载brook");
|
||||
RunCmd("echo y | nami remove github.com/txthinking/brook");
|
||||
|
||||
Console.WriteLine("关闭端口");
|
||||
ClosePort(Parameters.FreePorts.ToArray());
|
||||
|
||||
Console.WriteLine("******卸载完成******");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,7 +20,10 @@ namespace ProxySuper.Core.Services
|
|||
|
||||
public void Uninstall()
|
||||
{
|
||||
UninstallCaddy();
|
||||
RunCmd("rm -rf caddy_install.sh");
|
||||
RunCmd("curl -o caddy_install.sh https://raw.githubusercontent.com/proxysu/shellscript/master/Caddy-Naive/caddy-naive-install.sh");
|
||||
RunCmd("yes | bash caddy_install.sh uninstall");
|
||||
RunCmd("rm -rf caddy_install.sh");
|
||||
WriteOutput("ProxyNaive卸载完成");
|
||||
}
|
||||
|
||||
|
@ -90,7 +93,7 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var errorLog = "安装终止," + ex.Message;
|
||||
WriteOutput(errorLog);
|
||||
MessageBox.Show(errorLog);
|
||||
MessageBox.Show("安装失败,请联系开发者或上传日志文件(Logs文件夹下)到github提问。");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,6 +101,8 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
WriteOutput("安装 NaiveProxy");
|
||||
RunCmd(@"curl https://raw.githubusercontent.com/proxysu/shellscript/master/Caddy-Naive/caddy-naive-install.sh yes | bash");
|
||||
// 允许开机启动
|
||||
RunCmd("systemctl enable caddy");
|
||||
UploadCaddyFile(false);
|
||||
ConfigNetwork();
|
||||
WriteOutput("NaiveProxy 安装完成");
|
||||
|
|
|
@ -20,6 +20,12 @@ namespace ProxySuper.Core.Services
|
|||
Yum
|
||||
}
|
||||
|
||||
public enum ArchType
|
||||
{
|
||||
x86,
|
||||
arm,
|
||||
}
|
||||
|
||||
public abstract class ProjectBase<TSettings> where TSettings : IProjectSettings
|
||||
{
|
||||
private SshClient _sshClient;
|
||||
|
@ -28,6 +34,8 @@ namespace ProxySuper.Core.Services
|
|||
|
||||
protected CmdType CmdType { get; set; }
|
||||
|
||||
protected ArchType ArchType { get; set; }
|
||||
|
||||
protected bool IsSELinux { get; set; }
|
||||
|
||||
protected bool OnlyIpv6 { get; set; }
|
||||
|
@ -67,10 +75,25 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
string cmd;
|
||||
|
||||
// cpu架构
|
||||
var result = RunCmd("uname -m");
|
||||
if (result.Contains("x86"))
|
||||
{
|
||||
ArchType = ArchType.x86;
|
||||
}
|
||||
else if (result.Contains("arm") || result.Contains("arch"))
|
||||
{
|
||||
ArchType = ArchType.arm;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"未识别的架构处理器架构:{result}");
|
||||
}
|
||||
|
||||
// 确认安装命令
|
||||
if (CmdType == CmdType.None)
|
||||
{
|
||||
cmd = RunCmd("command -v apt-get");
|
||||
cmd = RunCmd("command -v apt");
|
||||
if (!string.IsNullOrEmpty(cmd))
|
||||
{
|
||||
CmdType = CmdType.Apt;
|
||||
|
@ -83,6 +106,8 @@ namespace ProxySuper.Core.Services
|
|||
if (!string.IsNullOrEmpty(cmd))
|
||||
{
|
||||
CmdType = CmdType.Dnf;
|
||||
//RunCmd("echo \"export LC_ALL=en_US.UTF-8\" >> /etc/profile");
|
||||
//RunCmd("source /etc/profile");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +130,7 @@ namespace ProxySuper.Core.Services
|
|||
|
||||
if (CmdType == CmdType.None || !hasSystemCtl)
|
||||
{
|
||||
throw new Exception("系统缺乏必要的安装组件如:apt-get||dnf||yum||Syetemd,主机系统推荐使用:CentOS 7/8,Debian 8/9/10,Ubuntu 16.04及以上版本");
|
||||
throw new Exception("系统缺乏必要的安装组件如:apt||dnf||yum||Syetemd,主机系统推荐使用:CentOS 7/8,Debian 8/9/10,Ubuntu 16.04及以上版本");
|
||||
}
|
||||
|
||||
|
||||
|
@ -157,6 +182,8 @@ namespace ProxySuper.Core.Services
|
|||
/// </summary>
|
||||
protected void ConfigureSoftware()
|
||||
{
|
||||
RunCmd(GetUpdateCmd());
|
||||
|
||||
string cmd = RunCmd("command -v sudo");
|
||||
if (string.IsNullOrEmpty(cmd))
|
||||
{
|
||||
|
@ -188,17 +215,14 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
if (CmdType == CmdType.Apt)
|
||||
{
|
||||
RunCmd(GetUpdateCmd());
|
||||
RunCmd(GetInstallCmd("dnsutils"));
|
||||
}
|
||||
else if (CmdType == CmdType.Dnf)
|
||||
{
|
||||
RunCmd(GetUpdateCmd());
|
||||
RunCmd(GetInstallCmd("bind-utils"));
|
||||
}
|
||||
else if (CmdType == CmdType.Yum)
|
||||
{
|
||||
RunCmd(GetUpdateCmd());
|
||||
RunCmd(GetInstallCmd("bind-utils"));
|
||||
}
|
||||
}
|
||||
|
@ -214,6 +238,13 @@ namespace ProxySuper.Core.Services
|
|||
RunCmd(GetInstallCmd("xz-devel"));
|
||||
}
|
||||
|
||||
// 检测是否安装cron
|
||||
cmd = RunCmd("command -v cron");
|
||||
if (string.IsNullOrEmpty(cmd))
|
||||
{
|
||||
RunCmd(GetInstallCmd("cron"));
|
||||
}
|
||||
|
||||
// 检测是否安装lsof
|
||||
cmd = RunCmd("command -v lsof");
|
||||
if (string.IsNullOrEmpty(cmd))
|
||||
|
@ -395,10 +426,29 @@ namespace ProxySuper.Core.Services
|
|||
/// </summary>
|
||||
protected void InstallCaddy()
|
||||
{
|
||||
RunCmd("rm -rf caddy_install.sh");
|
||||
RunCmd("curl -o caddy_install.sh https://raw.githubusercontent.com/proxysu/shellscript/master/Caddy-Naive/caddy-naive-install.sh");
|
||||
RunCmd("yes | bash caddy_install.sh");
|
||||
RunCmd("rm -rf caddy_install.sh");
|
||||
if (CmdType == CmdType.Apt)
|
||||
{
|
||||
RunCmd("apt install -y debian-keyring debian-archive-keyring apt-transport-https");
|
||||
RunCmd("echo yes | curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo apt-key add -");
|
||||
RunCmd("echo yes | curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list");
|
||||
RunCmd("sudo apt -y update");
|
||||
RunCmd("sudo apt install -y caddy");
|
||||
}
|
||||
|
||||
if (CmdType == CmdType.Dnf)
|
||||
{
|
||||
RunCmd("dnf install -y 'dnf-command(copr)'");
|
||||
RunCmd("dnf copr -y enable @caddy/caddy");
|
||||
RunCmd("dnf install -y caddy");
|
||||
}
|
||||
|
||||
if (CmdType == CmdType.Yum)
|
||||
{
|
||||
RunCmd("yum install -y yum-plugin-copr");
|
||||
RunCmd("yum copr -y enable @caddy/caddy");
|
||||
RunCmd("yum install -y caddy");
|
||||
}
|
||||
|
||||
RunCmd("systemctl enable caddy.service");
|
||||
}
|
||||
|
||||
|
@ -407,11 +457,25 @@ namespace ProxySuper.Core.Services
|
|||
/// </summary>
|
||||
protected void UninstallCaddy()
|
||||
{
|
||||
RunCmd("rm -rf caddy_install.sh");
|
||||
RunCmd("curl -o caddy_install.sh https://raw.githubusercontent.com/proxysu/shellscript/master/Caddy-Naive/caddy-naive-install.sh");
|
||||
RunCmd("yes | bash caddy_install.sh uninstall");
|
||||
RunCmd("rm -rf caddy_install.sh");
|
||||
RunCmd("systemctl stop caddy");
|
||||
if (CmdType == CmdType.Apt)
|
||||
{
|
||||
RunCmd("sudo apt -y remove caddy");
|
||||
}
|
||||
|
||||
if (CmdType == CmdType.Dnf)
|
||||
{
|
||||
RunCmd("dnf -y remove caddy");
|
||||
}
|
||||
|
||||
if (CmdType == CmdType.Yum)
|
||||
{
|
||||
RunCmd("yum -y remove caddy");
|
||||
}
|
||||
|
||||
RunCmd("rm -rf /usr/bin/caddy");
|
||||
RunCmd("rm -rf /usr/share/caddy");
|
||||
RunCmd("rm -rf /etc/caddy");
|
||||
}
|
||||
|
||||
|
||||
|
@ -435,7 +499,7 @@ namespace ProxySuper.Core.Services
|
|||
|
||||
if (string.IsNullOrEmpty(IPv6))
|
||||
{
|
||||
throw new Exception("未检测可用的的IP地址");
|
||||
throw new Exception("未检测到可用的的IP地址,请重试安装");
|
||||
}
|
||||
|
||||
OnlyIpv6 = true;
|
||||
|
@ -629,6 +693,7 @@ namespace ProxySuper.Core.Services
|
|||
RunCmd(GetInstallCmd("automake autoconf libtool"));
|
||||
|
||||
// 安装Acme
|
||||
|
||||
var result = RunCmd($"curl https://get.acme.sh yes | sh");
|
||||
if (result.Contains("Install success"))
|
||||
{
|
||||
|
@ -646,12 +711,12 @@ namespace ProxySuper.Core.Services
|
|||
// 申请证书
|
||||
if (OnlyIpv6)
|
||||
{
|
||||
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --listen-v6 --pre-hook \"service caddy stop\" --post-hook \"service caddy start\"";
|
||||
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --listen-v6 --pre-hook \"systemctl stop caddy\" --post-hook \"systemctl start caddy\" --server letsencrypt";
|
||||
result = RunCmd(cmd);
|
||||
}
|
||||
else
|
||||
{
|
||||
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --pre-hook \"service caddy stop\" --post-hook \"service caddy start\"";
|
||||
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --pre-hook \"systemctl stop caddy\" --post-hook \"systemctl start caddy\" --server letsencrypt";
|
||||
result = RunCmd(cmd);
|
||||
}
|
||||
|
||||
|
@ -707,7 +772,7 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
if (CmdType == CmdType.Apt)
|
||||
{
|
||||
return "apt-get update";
|
||||
return "apt update";
|
||||
}
|
||||
else if (CmdType == CmdType.Dnf)
|
||||
{
|
||||
|
@ -730,15 +795,15 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
if (CmdType == CmdType.Apt)
|
||||
{
|
||||
return "echo y | apt-get install " + soft;
|
||||
return "apt install -y " + soft;
|
||||
}
|
||||
else if (CmdType == CmdType.Dnf)
|
||||
{
|
||||
return "echo y | dnf -y install " + soft;
|
||||
return "dnf install -y " + soft;
|
||||
}
|
||||
else if (CmdType == CmdType.Yum)
|
||||
{
|
||||
return "echo y | yum -y install " + soft;
|
||||
return "yum install -y " + soft;
|
||||
}
|
||||
|
||||
throw new Exception("未识别的系统");
|
||||
|
|
|
@ -168,7 +168,7 @@ namespace ProxySuper.Core.Services
|
|||
case XrayType.VLESS_gRPC:
|
||||
_protocol = "vless";
|
||||
_type = "grpc";
|
||||
_path = settings.VLESS_gRPC_ServiceName;
|
||||
_port = settings.VLESS_gRPC_Port;
|
||||
_descriptiveText = "vless-gRPC";
|
||||
break;
|
||||
case XrayType.Trojan_TCP:
|
||||
|
@ -198,6 +198,12 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
parametersURL += "&flow=xtls-rprx-direct";
|
||||
}
|
||||
|
||||
|
||||
if (xrayType == XrayType.VLESS_gRPC)
|
||||
{
|
||||
parametersURL += $"&serviceName={settings.VLESS_gRPC_ServiceName}&mode=gun";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -48,8 +48,10 @@ namespace ProxySuper.Core.Services
|
|||
|
||||
public void Uninstall()
|
||||
{
|
||||
EnsureRootAuth();
|
||||
EnsureSystemEnv();
|
||||
|
||||
RunCmd("systemctl stop trojan-go");
|
||||
RunCmd("systemctl stop caddy");
|
||||
base.UninstallCaddy();
|
||||
|
||||
RunCmd("rm -rf /usr/local/bin/trojan-go");
|
||||
|
@ -127,13 +129,12 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var errorLog = "安装终止," + ex.Message;
|
||||
WriteOutput(errorLog);
|
||||
MessageBox.Show(errorLog);
|
||||
MessageBox.Show("安装失败,请联系开发者或上传日志文件(Logs文件夹下)到github提问。");
|
||||
}
|
||||
}
|
||||
|
||||
private void InstallTrojanGo()
|
||||
{
|
||||
WriteOutput("安装Trojan-Go");
|
||||
RunCmd(@"curl https://raw.githubusercontent.com/proxysu/shellscript/master/trojan-go.sh yes | bash");
|
||||
var success = FileExists("/usr/local/bin/trojan-go");
|
||||
if (success == false)
|
||||
|
|
|
@ -28,7 +28,6 @@ namespace ProxySuper.Core.Services
|
|||
public static int VLESS_TCP_Port = 1110;
|
||||
public static int VLESS_WS_Port = 1111;
|
||||
public static int VLESS_H2_Port = 1112;
|
||||
public static int VLESS_mKCP_Port = 1113;
|
||||
|
||||
public static int VMESS_TCP_Port = 1210;
|
||||
public static int VMESS_WS_Port = 1211;
|
||||
|
@ -96,8 +95,31 @@ namespace ProxySuper.Core.Services
|
|||
return caddyStr;
|
||||
}
|
||||
|
||||
private static void SetClients(dynamic bound, List<string> uuidList, bool withXtls = false)
|
||||
{
|
||||
bound.settings.clients.Clear();
|
||||
uuidList.ForEach(id =>
|
||||
{
|
||||
object obj;
|
||||
if (!withXtls)
|
||||
{
|
||||
obj = new { id = id };
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = new { id = id, flow = "xtls-rprx-direct" };
|
||||
}
|
||||
|
||||
bound.settings.clients.Add(JToken.FromObject(obj));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static string BuildXrayConfig(XraySettings parameters)
|
||||
{
|
||||
var uuidList = parameters.MulitUUID;
|
||||
uuidList.Insert(0, parameters.UUID);
|
||||
|
||||
var xrayConfig = LoadXrayConfig();
|
||||
var baseBound = GetBound("VLESS_TCP_XTLS.json");
|
||||
baseBound.port = parameters.Port;
|
||||
|
@ -106,13 +128,13 @@ namespace ProxySuper.Core.Services
|
|||
dest = FullbackPort
|
||||
}));
|
||||
xrayConfig.inbounds.Add(baseBound);
|
||||
baseBound.settings.clients[0].id = parameters.UUID;
|
||||
SetClients(baseBound, uuidList, withXtls: true);
|
||||
|
||||
if (parameters.Types.Contains(XrayType.VLESS_WS))
|
||||
{
|
||||
var wsInbound = GetBound("VLESS_WS.json");
|
||||
wsInbound.port = VLESS_WS_Port;
|
||||
wsInbound.settings.clients[0].id = parameters.UUID;
|
||||
SetClients(wsInbound, uuidList);
|
||||
wsInbound.streamSettings.wsSettings.path = parameters.VLESS_WS_Path;
|
||||
baseBound.settings.fallbacks.Add(JToken.FromObject(new
|
||||
{
|
||||
|
@ -127,8 +149,9 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var gRPCInBound = GetBound("VLESS_gRPC.json");
|
||||
gRPCInBound.port = parameters.VLESS_gRPC_Port;
|
||||
gRPCInBound.settings.clients[0].id = parameters.UUID;
|
||||
SetClients(gRPCInBound, uuidList);
|
||||
gRPCInBound.streamSettings.grpcSettings.serviceName = parameters.VLESS_gRPC_ServiceName;
|
||||
gRPCInBound.streamSettings.tlsSettings.serverName = parameters.Domain;
|
||||
xrayConfig.inbounds.Add(JToken.FromObject(gRPCInBound));
|
||||
}
|
||||
|
||||
|
@ -136,7 +159,7 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var kcpBound = GetBound("VLESS_KCP.json");
|
||||
kcpBound.port = parameters.VLESS_KCP_Port;
|
||||
kcpBound.settings.clients[0].id = parameters.UUID;
|
||||
SetClients(kcpBound, uuidList);
|
||||
kcpBound.streamSettings.kcpSettings.header.type = parameters.VLESS_KCP_Type;
|
||||
kcpBound.streamSettings.kcpSettings.seed = parameters.VLESS_KCP_Seed;
|
||||
xrayConfig.inbounds.Add(JToken.FromObject(kcpBound));
|
||||
|
@ -146,7 +169,7 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var mtcpBound = GetBound("VMESS_TCP.json");
|
||||
mtcpBound.port = VMESS_TCP_Port;
|
||||
mtcpBound.settings.clients[0].id = parameters.UUID;
|
||||
SetClients(mtcpBound, uuidList);
|
||||
mtcpBound.streamSettings.tcpSettings.header.request.path = parameters.VMESS_TCP_Path;
|
||||
baseBound.settings.fallbacks.Add(JToken.FromObject(new
|
||||
{
|
||||
|
@ -161,7 +184,7 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var mwsBound = GetBound("VMESS_WS.json");
|
||||
mwsBound.port = VMESS_WS_Port;
|
||||
mwsBound.settings.clients[0].id = parameters.UUID;
|
||||
SetClients(mwsBound, uuidList);
|
||||
mwsBound.streamSettings.wsSettings.path = parameters.VMESS_WS_Path;
|
||||
baseBound.settings.fallbacks.Add(JToken.FromObject(new
|
||||
{
|
||||
|
@ -176,7 +199,7 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var kcpBound = GetBound("VMESS_KCP.json");
|
||||
kcpBound.port = parameters.VMESS_KCP_Port;
|
||||
kcpBound.settings.clients[0].id = parameters.UUID;
|
||||
SetClients(kcpBound, uuidList);
|
||||
kcpBound.streamSettings.kcpSettings.header.type = parameters.VMESS_KCP_Type;
|
||||
kcpBound.streamSettings.kcpSettings.seed = parameters.VMESS_KCP_Seed;
|
||||
xrayConfig.inbounds.Add(JToken.FromObject(kcpBound));
|
||||
|
|
|
@ -98,13 +98,14 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
var errorLog = "安装终止," + ex.Message;
|
||||
WriteOutput(errorLog);
|
||||
MessageBox.Show(errorLog);
|
||||
MessageBox.Show("安装失败,请联系开发者或上传日志文件(Logs文件夹下)到github提问。");
|
||||
}
|
||||
}
|
||||
|
||||
public void UninstallProxy()
|
||||
{
|
||||
EnsureRootAuth();
|
||||
EnsureSystemEnv();
|
||||
WriteOutput("卸载Caddy");
|
||||
UninstallCaddy();
|
||||
WriteOutput("卸载Xray");
|
||||
|
@ -112,7 +113,7 @@ namespace ProxySuper.Core.Services
|
|||
WriteOutput("卸载证书");
|
||||
UninstallAcme();
|
||||
WriteOutput("关闭端口");
|
||||
ClosePort(Parameters.ShadowSocksPort, Parameters.VMESS_KCP_Port);
|
||||
ClosePort(Parameters.FreePorts.ToArray());
|
||||
|
||||
WriteOutput("************ 卸载完成 ************");
|
||||
}
|
||||
|
@ -136,12 +137,13 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
EnsureRootAuth();
|
||||
EnsureSystemEnv();
|
||||
ConfigurePort();
|
||||
ConfigureFirewall();
|
||||
var configJson = XrayConfigBuilder.BuildXrayConfig(Parameters);
|
||||
var stream = new MemoryStream(Encoding.UTF8.GetBytes(configJson));
|
||||
RunCmd("rm -rf /usr/local/etc/xray/config.json");
|
||||
UploadFile(stream, "/usr/local/etc/xray/config.json");
|
||||
ConfigurePort();
|
||||
|
||||
UploadCaddyFile(string.IsNullOrEmpty(Parameters.MaskDomain));
|
||||
RunCmd("systemctl restart xray");
|
||||
WriteOutput("************ 更新Xray配置成功,更新配置不包含域名,如果域名更换请重新安装。 ************");
|
||||
|
@ -153,6 +155,7 @@ namespace ProxySuper.Core.Services
|
|||
public void DoUninstallCaddy()
|
||||
{
|
||||
EnsureRootAuth();
|
||||
EnsureSystemEnv();
|
||||
UninstallCaddy();
|
||||
WriteOutput("************ 卸载Caddy完成 ************");
|
||||
}
|
||||
|
|
76
ProxySuper.Core/ViewModels/BrookEditorViewModel.cs
Normal file
76
ProxySuper.Core/ViewModels/BrookEditorViewModel.cs
Normal file
|
@ -0,0 +1,76 @@
|
|||
using MvvmCross.Commands;
|
||||
using MvvmCross.Navigation;
|
||||
using MvvmCross.ViewModels;
|
||||
using ProxySuper.Core.Models;
|
||||
using ProxySuper.Core.Models.Hosts;
|
||||
using ProxySuper.Core.Models.Projects;
|
||||
using ProxySuper.Core.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProxySuper.Core.ViewModels
|
||||
{
|
||||
public class BrookEditorViewModel : MvxViewModel<Record, Record>
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
public Host Host { get; set; }
|
||||
|
||||
public BrookSettings Settings { get; set; }
|
||||
|
||||
public List<string> BrookTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<string> {
|
||||
BrookType.server.ToString(),
|
||||
BrookType.wsserver.ToString(),
|
||||
BrookType.wssserver.ToString(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public string CheckedBrookType
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings.BrookType.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
Settings.BrookType = (BrookType)Enum.Parse(typeof(BrookType), value);
|
||||
RaisePropertyChanged("EnablePort");
|
||||
RaisePropertyChanged("EnableDomain");
|
||||
}
|
||||
}
|
||||
|
||||
public bool EnablePort => Settings.BrookType != BrookType.wssserver;
|
||||
|
||||
public bool EnableDomain => Settings.BrookType == BrookType.wssserver;
|
||||
|
||||
public IMvxCommand SaveCommand => new MvxCommand(() => Save());
|
||||
|
||||
public IMvxNavigationService NavigationService { get; }
|
||||
|
||||
public override void Prepare(Record parameter)
|
||||
{
|
||||
var record = Utils.DeepClone(parameter);
|
||||
Id = record.Id;
|
||||
Host = record.Host;
|
||||
Settings = record.BrookSettings;
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
NavigationService.Close(this, new Record()
|
||||
{
|
||||
Id = Id,
|
||||
Host = Host,
|
||||
BrookSettings = Settings,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -66,6 +66,8 @@ namespace ProxySuper.Core.ViewModels
|
|||
|
||||
public IMvxCommand AddNaiveProxyCommand => new MvxAsyncCommand(AddNaiveProxyRecord);
|
||||
|
||||
public IMvxCommand AddBrookCommand => new MvxAsyncCommand(AddBrookRecord);
|
||||
|
||||
public IMvxCommand RemoveCommand => new MvxAsyncCommand<string>(DeleteRecord);
|
||||
|
||||
public IMvxCommand EditCommand => new MvxAsyncCommand<string>(EditRecord);
|
||||
|
@ -118,6 +120,21 @@ namespace ProxySuper.Core.ViewModels
|
|||
SaveToJson();
|
||||
}
|
||||
|
||||
public async Task AddBrookRecord()
|
||||
{
|
||||
Record record = new Record();
|
||||
record.Id = Utils.GetTickID();
|
||||
record.Host = new Host();
|
||||
record.BrookSettings = new BrookSettings();
|
||||
|
||||
var result = await _navigationService.Navigate<BrookEditorViewModel, Record, Record>(record);
|
||||
if (result == null) return;
|
||||
|
||||
Records.Add(result);
|
||||
|
||||
SaveToJson();
|
||||
}
|
||||
|
||||
|
||||
public async Task EditRecord(string id)
|
||||
{
|
||||
|
|
|
@ -56,6 +56,14 @@ namespace ProxySuper.Core.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public bool Checked_VLESS_gRPC
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings.Types.Contains(XrayType.VLESS_gRPC);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Checked_VMESS_TCP
|
||||
{
|
||||
get
|
||||
|
|
|
@ -110,6 +110,18 @@ namespace ProxySuper.Core.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public string MultiUUID
|
||||
{
|
||||
get => string.Join(",", Settings.MulitUUID);
|
||||
set
|
||||
{
|
||||
var input = value.Replace(',', ',');
|
||||
var arr = input.Split(',').ToList();
|
||||
Settings.MulitUUID = arr;
|
||||
RaisePropertyChanged("MultiUUID");
|
||||
}
|
||||
}
|
||||
|
||||
public string Domain
|
||||
{
|
||||
get => Settings.Domain;
|
||||
|
|
|
@ -43,7 +43,5 @@ namespace ProxySuper.Core.ViewModels
|
|||
}
|
||||
|
||||
public string CommandText { get; set; }
|
||||
|
||||
public string OutputText { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="端口(Port)" Width="140" />
|
||||
<TextBox Text="{Binding Path=Settings.ShadowSocksPort,Mode=OneTime}" IsReadOnly="True" Width="300" />
|
||||
<TextBox Text="{Binding Path=Settings.Port,Mode=OneTime}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="服务器端口(Port)" Width="140" />
|
||||
<TextBox Text="443" IsReadOnly="True" Width="300" />
|
||||
<TextBox Text="{Binding Settings.Port}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="端口(port)" Width="140" />
|
||||
<TextBox Text="443" IsReadOnly="True" Width="300" />
|
||||
<TextBox Text="{Binding Settings.Port}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="端口(port)" Width="140" />
|
||||
<TextBox Text="443" IsReadOnly="True" Width="300" />
|
||||
<TextBox Text="{Binding Settings.Port}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="端口(port)" Width="140" />
|
||||
<TextBox Text="443" IsReadOnly="True" Width="300" />
|
||||
<TextBox Text="{Binding Settings.Port}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="端口(port)" Width="140" />
|
||||
<TextBox Text="443" IsReadOnly="True" Width="300" />
|
||||
<TextBox Text="{Binding Settings.Port}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="端口(port)" Width="140" />
|
||||
<TextBox Text="443" IsReadOnly="True" Width="300" />
|
||||
<TextBox Text="{Binding Settings.Port}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
|
|
@ -10,179 +10,187 @@
|
|||
<UserControl.Resources>
|
||||
<convert:VisibleConverter x:Key="VisibleConverter" />
|
||||
</UserControl.Resources>
|
||||
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel Width="220">
|
||||
<!--XTLS-->
|
||||
<CheckBox Margin="0,10,0,0"
|
||||
<!--XTLS-->
|
||||
<CheckBox Margin="0,10,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Path=Checked_VLESS_TCP_XTLS}">
|
||||
<Label Content="{DynamicResource VlessXtlsDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
<Label Content="{DynamicResource VlessXtlsDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
|
||||
<!--TCP-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
<!--TCP-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Path=Checked_VLESS_TCP}">
|
||||
<Label Content="{DynamicResource VlessTcpDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
<Label Content="{DynamicResource VlessTcpDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
|
||||
<!--WebSocket-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
<!--WebSocket-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Path=Checked_VLESS_WS}">
|
||||
<Label Content="{DynamicResource VlessWsDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
<Label Content="{DynamicResource VlessWsDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
|
||||
<!--mKCP-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
<!--mKCP-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
Foreground="LimeGreen"
|
||||
IsChecked="{Binding Path=Checked_VLESS_KCP}">
|
||||
<Label Content="{DynamicResource VlessKcpDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
<Label Content="{DynamicResource VlessKcpDesc}" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
|
||||
<!--TCP-->
|
||||
<!--<CheckBox Content="VMESS over TCP with TLS
不推荐"
|
||||
<!--gRPC-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
Foreground="LimeGreen"
|
||||
IsChecked="{Binding Path=Checked_VLESS_gRPC}">
|
||||
<Label Content="VLESS gRPC
基于http2,多路复用。" FontSize="13" Foreground="LimeGreen" />
|
||||
</CheckBox>
|
||||
|
||||
<!--TCP-->
|
||||
<!--<CheckBox Content="VMESS over TCP with TLS
不推荐"
|
||||
Margin="0,15,0,0"
|
||||
FontSize="13"
|
||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||
IsChecked="{Binding Path=Checked_VMESS_TCP}" />-->
|
||||
|
||||
<!--WebSocket-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
<!--WebSocket-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Path=Checked_VMESS_WS}">
|
||||
<Label Content="{DynamicResource VmessWsDesc}" FontSize="13" Foreground="Blue" />
|
||||
</CheckBox>
|
||||
<Label Content="{DynamicResource VmessWsDesc}" FontSize="13" Foreground="Blue" />
|
||||
</CheckBox>
|
||||
|
||||
<!--mKCP-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
<!--mKCP-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Path=Checked_VMESS_KCP}">
|
||||
<Label Foreground="Blue" FontSize="13" Content="{DynamicResource VmessKcpDesc}" />
|
||||
</CheckBox>
|
||||
<Label Foreground="Blue" FontSize="13" Content="{DynamicResource VmessKcpDesc}" />
|
||||
</CheckBox>
|
||||
|
||||
<!--ss-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
<!--ss-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Path=CheckedShadowSocks}">
|
||||
<Label Content="{DynamicResource SSDesc}" FontSize="13" Foreground="Fuchsia" />
|
||||
</CheckBox>
|
||||
<Label Content="{DynamicResource SSDesc}" FontSize="13" Foreground="Fuchsia" />
|
||||
</CheckBox>
|
||||
|
||||
<!--Trojan-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
<!--Trojan-->
|
||||
<CheckBox Margin="0,15,0,0"
|
||||
Foreground="CadetBlue"
|
||||
VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Path=Checked_Trojan_TCP}">
|
||||
<Label Content="{DynamicResource TrojanDesc}" FontSize="13" Foreground="CadetBlue" />
|
||||
</CheckBox>
|
||||
<Label Content="{DynamicResource TrojanDesc}" FontSize="13" Foreground="CadetBlue" />
|
||||
</CheckBox>
|
||||
|
||||
<!--gRPC-->
|
||||
<!--<CheckBox Content="VLESS gRPC
基于http2,多路复用。"
|
||||
Margin="0,15,0,0"
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||
IsChecked="{Binding Path=Checked_VLESS_gRPC}"/>-->
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--************************** 参数 **************************-->
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<!--Domain-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--Domain-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource XrayDomain}" Width="120" />
|
||||
<TextBox Text="{Binding Path=Domain}" Width="200" />
|
||||
</StackPanel>
|
||||
<Label Content="{DynamicResource XrayDomain}" Width="120" />
|
||||
<TextBox Text="{Binding Path=Domain}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--Mask Domain-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--Mask Domain-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
|
||||
<TextBox Text="{Binding Path=MaskDomain}" Width="200" />
|
||||
</StackPanel>
|
||||
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
|
||||
<TextBox Text="{Binding Path=MaskDomain}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--UUID-->
|
||||
<StackPanel Margin="30,10,0,0"
|
||||
<!--UUID-->
|
||||
<StackPanel Margin="30,10,0,0"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource XrayUUID}" Width="120" />
|
||||
<Label Content="{DynamicResource XrayUUID}" Width="120" />
|
||||
|
||||
<TextBox Text="{Binding Path=UUID}"
|
||||
<TextBox Text="{Binding Path=UUID}"
|
||||
Width="200" />
|
||||
|
||||
<Button Margin="5,0,0,0"
|
||||
<Button Margin="5,0,0,0"
|
||||
Padding="12,3"
|
||||
Command="{Binding Path=RandomUuid}"
|
||||
Content="{DynamicResource Random}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--WebSocket Path-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--WebSocket Path-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VLESS_WS,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" />
|
||||
<TextBox Text="{Binding Path=VLESS_WS_Path}"
|
||||
<Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" />
|
||||
<TextBox Text="{Binding Path=VLESS_WS_Path}"
|
||||
Width="200" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--seed-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--seed-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VLESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource VlessKcpSeed}" Foreground="LimeGreen" Width="120" />
|
||||
<TextBox Text="{Binding Path=VLESS_KCP_Seed}" Width="200" />
|
||||
</StackPanel>
|
||||
<Label Content="{DynamicResource VlessKcpSeed}" Foreground="LimeGreen" Width="120" />
|
||||
<TextBox Text="{Binding Path=VLESS_KCP_Seed}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp type-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--kcp type-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VLESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}" Orientation="Horizontal">
|
||||
|
||||
<Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" />
|
||||
<ComboBox Width="200"
|
||||
<Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" />
|
||||
<ComboBox Width="200"
|
||||
ItemsSource="{Binding Path=KcpTypes}"
|
||||
SelectedValue="{Binding VLESS_KCP_Type,Mode=TwoWay}">
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp port-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--kcp port-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VLESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource VlessKcpPort}" Width="120" Foreground="LimeGreen" />
|
||||
<TextBox Text="{Binding Path=VLESS_KCP_Port}" Width="200" />
|
||||
</StackPanel>
|
||||
<Label Content="{DynamicResource VlessKcpPort}" Width="120" Foreground="LimeGreen" />
|
||||
<TextBox Text="{Binding Path=VLESS_KCP_Port}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--gRPC Port-->
|
||||
<!--<StackPanel Margin="30,15,0,0"
|
||||
<!--gRPC Port-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VLESS_gRPC,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="gRPC端口" Width="120" Foreground="LimeGreen" />
|
||||
<TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="120" />
|
||||
<Label Content="{DynamicResource VlessRPCPort}" Width="120" Foreground="LimeGreen" />
|
||||
<TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<Label Content="服务器" Width="120" Margin="10,0,0,0" Foreground="LimeGreen" />
|
||||
<TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="120" />
|
||||
</StackPanel>-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VLESS_gRPC,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource VlessRPCName}" Width="120" Foreground="LimeGreen" />
|
||||
<TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--Tcp Path-->
|
||||
<!--<StackPanel Margin="30,15,0,0"
|
||||
<!--Tcp Path
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VMESS_TCP,
|
||||
|
@ -194,102 +202,140 @@
|
|||
Width="200" />
|
||||
</StackPanel>-->
|
||||
|
||||
<!--WebSocket Path-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--WebSocket Path-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VMESS_WS,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource VmessWsPath}" Foreground="Blue" Width="120" />
|
||||
<TextBox Text="{Binding Path=VMESS_WS_Path}"
|
||||
<Label Content="{DynamicResource VmessWsPath}" Foreground="Blue" Width="120" />
|
||||
<TextBox Text="{Binding Path=VMESS_WS_Path}"
|
||||
VerticalAlignment="Bottom"
|
||||
Width="200" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--seed-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--seed-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VMESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource VmessKcpSeed}" Foreground="Blue" Width="120" />
|
||||
<TextBox Text="{Binding Path=VMESS_KCP_Seed}" Width="200" />
|
||||
</StackPanel>
|
||||
<Label Content="{DynamicResource VmessKcpSeed}" Foreground="Blue" Width="120" />
|
||||
<TextBox Text="{Binding Path=VMESS_KCP_Seed}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp type-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--kcp type-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VMESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource VmessKcpType}" Foreground="Blue" Width="120" VerticalAlignment="Bottom"/>
|
||||
<ComboBox Width="200"
|
||||
<Label Content="{DynamicResource VmessKcpType}" Foreground="Blue" Width="120" VerticalAlignment="Bottom"/>
|
||||
<ComboBox Width="200"
|
||||
VerticalAlignment="Bottom"
|
||||
ItemsSource="{Binding Path=KcpTypes}"
|
||||
SelectedValue="{Binding VMESS_KCP_Type,Mode=TwoWay}">
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp port-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--kcp port-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_VMESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource VmessKcpPort}" Foreground="Blue" Width="120" />
|
||||
<TextBox Text="{Binding Path=VMESS_KCP_Port}" Width="200" />
|
||||
</StackPanel>
|
||||
<Label Content="{DynamicResource VmessKcpPort}" Foreground="Blue" Width="120" />
|
||||
<TextBox Text="{Binding Path=VMESS_KCP_Port}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--ss密码-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--ss密码-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=CheckedShadowSocks,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" />
|
||||
<TextBox Text="{Binding Path=ShadowSocksPassword}"
|
||||
<Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" />
|
||||
<TextBox Text="{Binding Path=ShadowSocksPassword}"
|
||||
Width="200"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--ss加密方式-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--ss加密方式-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=CheckedShadowSocks,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource SSMethods}" Foreground="Fuchsia" Width="120" />
|
||||
<ComboBox Width="200"
|
||||
<Label Content="{DynamicResource SSMethods}" Foreground="Fuchsia" Width="120" />
|
||||
<ComboBox Width="200"
|
||||
ItemsSource="{Binding ShadowSocksMethods}"
|
||||
SelectedValue="{Binding ShadowSocksMethod}">
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--ss端口-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=CheckedShadowSocks,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource SSPort}" Foreground="Fuchsia" Width="120" />
|
||||
<TextBox Text="{Binding Path=ShadowSocksPort}" Width="200"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--Trojan密码-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--Trojan密码-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_Trojan_TCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
|
||||
<TextBox Text="{Binding Path=TrojanPassword}"
|
||||
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
|
||||
<TextBox Text="{Binding Path=TrojanPassword}"
|
||||
Width="200" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--xray prot-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
<!--Trojan端口-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Checked_Trojan_TCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
|
||||
<TextBox Text="{Binding Path=TrojanPassword}" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!--xray prot-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource XrayPort}" Foreground="Gray" Width="120" />
|
||||
<TextBox Text="{Binding Path=Port}" Width="120" />
|
||||
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
|
||||
<Label Content="{DynamicResource XrayPort}" Foreground="Gray" Width="120" />
|
||||
<TextBox Text="{Binding Path=Port}" Width="120" />
|
||||
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
|
||||
</StackPanel>
|
||||
|
||||
<!--多用户-->
|
||||
<StackPanel Margin="30,10,0,0"
|
||||
Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource MultiUser}" Width="120" />
|
||||
|
||||
<TextBox Text="{Binding Path=MultiUUID}"
|
||||
Height="60"
|
||||
TextWrapping="Wrap"
|
||||
Width="200" />
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Margin="120,3,0,0" Text="{DynamicResource MultiUserHelp}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</UserControl>
|
||||
|
|
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.0.1.0")]
|
||||
[assembly: AssemblyFileVersion("4.0.1.0")]
|
||||
[assembly: AssemblyVersion("4.0.3.0")]
|
||||
[assembly: AssemblyFileVersion("4.0.3.0")]
|
||||
|
|
|
@ -5,38 +5,7 @@
|
|||
<AllowedReferenceRelatedFileExtensions>
|
||||
<!-- 阻止默认的 XML 和 PDB 文件复制到 RELEASE 的输出目录. 只有*.allowedextension 扩展名的文件可以被包含, 当然这个扩展的文件并不存在.-->
|
||||
.allowedextension
|
||||
</AllowedReferenceRelatedFileExtensions>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B083EBFD-2925-46C9-8B00-E2C1300CEBA1}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>ProxySuper.WPF</RootNamespace>
|
||||
<AssemblyName>ProxySuper.WPF</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
</AllowedReferenceRelatedFileExtensions><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ProjectGuid>{B083EBFD-2925-46C9-8B00-E2C1300CEBA1}</ProjectGuid><OutputType>WinExe</OutputType><RootNamespace>ProxySuper.WPF</RootNamespace><AssemblyName>ProxySuper.WPF</AssemblyName><TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion><FileAlignment>512</FileAlignment><ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids><WarningLevel>4</WarningLevel><AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects><Deterministic>true</Deterministic><NuGetPackageImportStamp></NuGetPackageImportStamp><IsWebBootstrapper>false</IsWebBootstrapper><TargetFrameworkProfile /><PublishUrl>publish\</PublishUrl><Install>true</Install><InstallFrom>Disk</InstallFrom><UpdateEnabled>false</UpdateEnabled><UpdateMode>Foreground</UpdateMode><UpdateInterval>7</UpdateInterval><UpdateIntervalUnits>Days</UpdateIntervalUnits><UpdatePeriodically>false</UpdatePeriodically><UpdateRequired>false</UpdateRequired><MapFileExtensions>true</MapFileExtensions><ApplicationRevision>0</ApplicationRevision><ApplicationVersion>1.0.0.%2a</ApplicationVersion><UseApplicationTrust>false</UseApplicationTrust><BootstrapperEnabled>true</BootstrapperEnabled></PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -142,6 +111,9 @@
|
|||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\BrookEditorView.xaml.cs">
|
||||
<DependentUpon>BrookEditorView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\HomeView.xaml.cs">
|
||||
<DependentUpon>HomeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -232,6 +204,10 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Page>
|
||||
<Page Include="Views\BrookEditorView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\HomeView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<sys:String x:Key="MainMenuActions">Actions</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsExportSettings">Export Settings</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsExportSubscribe">Export Subscribe</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsGetRoot">Get Root</sys:String>
|
||||
|
||||
<sys:String x:Key="MainMenuLanguage">Language</sys:String>
|
||||
<sys:String x:Key="MainMenuLanguageEn">English</sys:String>
|
||||
|
@ -75,17 +76,23 @@
|
|||
<sys:String x:Key="XrayDomain">Address</sys:String>
|
||||
<sys:String x:Key="XrayMarkDomain">GuiseHost</sys:String>
|
||||
<sys:String x:Key="XrayUUID">UUID</sys:String>
|
||||
<sys:String x:Key="MultiUser">Multi User</sys:String>
|
||||
<sys:String x:Key="MultiUserHelp">Multi Id split with ","</sys:String>
|
||||
<sys:String x:Key="VlessWsPath">VLESS WS Path</sys:String>
|
||||
<sys:String x:Key="VlessKcpSeed">VLESS KCP Seed</sys:String>
|
||||
<sys:String x:Key="VlessKcpType">VLESS KCP Type</sys:String>
|
||||
<sys:String x:Key="VlessKcpPort">VLESS KCP Port</sys:String>
|
||||
<sys:String x:Key="VlessRPCName">gRPC Service Name</sys:String>
|
||||
<sys:String x:Key="VlessRPCPort">gRPC Port</sys:String>
|
||||
<sys:String x:Key="VmessWsPath">VMESS WS Path</sys:String>
|
||||
<sys:String x:Key="VmessKcpSeed">VMESS KCP Seed</sys:String>
|
||||
<sys:String x:Key="VmessKcpType">VMESS KCP Type</sys:String>
|
||||
<sys:String x:Key="VmessKcpPort">VMESS KCP Port</sys:String>
|
||||
<sys:String x:Key="SSPassword">SS Pwd</sys:String>
|
||||
<sys:String x:Key="SSMethods">SS Method</sys:String>
|
||||
<sys:String x:Key="SSPort">SS Port</sys:String>
|
||||
<sys:String x:Key="TrojanPassword">Trojan Pwd</sys:String>
|
||||
<sys:String x:Key="TrojanPort">Trojan Port</sys:String>
|
||||
<sys:String x:Key="XrayPort">xray Port</sys:String>
|
||||
<sys:String x:Key="XrayPortDefault">default port is 443</sys:String>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<sys:String x:Key="MainMenuActions">操作</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsExportSettings">導出配置</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsExportSubscribe">導出訂閲</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsGetRoot">啓用Root賬戶</sys:String>
|
||||
|
||||
<sys:String x:Key="MainMenuLanguage">語言(Language)</sys:String>
|
||||
<sys:String x:Key="MainMenuLanguageEn">English</sys:String>
|
||||
|
@ -74,17 +75,23 @@
|
|||
<sys:String x:Key="XrayDomain">域名</sys:String>
|
||||
<sys:String x:Key="XrayMarkDomain">偽裝域名</sys:String>
|
||||
<sys:String x:Key="XrayUUID">UUID</sys:String>
|
||||
<sys:String x:Key="MultiUser">多用戶</sys:String>
|
||||
<sys:String x:Key="MultiUserHelp">多個UUID用“,”分隔</sys:String>
|
||||
<sys:String x:Key="VlessWsPath">VLESS WS路徑</sys:String>
|
||||
<sys:String x:Key="VlessKcpSeed">VLESS KCP Seed</sys:String>
|
||||
<sys:String x:Key="VlessKcpType">VLESS KCP偽裝</sys:String>
|
||||
<sys:String x:Key="VlessKcpPort">VLESS KCP端口</sys:String>
|
||||
<sys:String x:Key="VlessRPCName">gRPC路徑</sys:String>
|
||||
<sys:String x:Key="VlessRPCPort">gRPC端口</sys:String>
|
||||
<sys:String x:Key="VmessWsPath">VMESS WS路徑</sys:String>
|
||||
<sys:String x:Key="VmessKcpSeed">VMESS KCP Seed</sys:String>
|
||||
<sys:String x:Key="VmessKcpType">VMESS KCP偽裝</sys:String>
|
||||
<sys:String x:Key="VmessKcpPort">VMESS KCP端口</sys:String>
|
||||
<sys:String x:Key="SSPassword">SS密碼</sys:String>
|
||||
<sys:String x:Key="SSMethods">SS加密方式</sys:String>
|
||||
<sys:String x:Key="SSPort">SS端口</sys:String>
|
||||
<sys:String x:Key="TrojanPassword">Trojan密碼</sys:String>
|
||||
<sys:String x:Key="TrojanPort">Trojan端口</sys:String>
|
||||
<sys:String x:Key="XrayPort">xray端口</sys:String>
|
||||
<sys:String x:Key="XrayPortDefault">默認端口443,不建議修改</sys:String>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<sys:String x:Key="MainMenuActions">操作</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsExportSettings">导出配置</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsExportSubscribe">导出订阅</sys:String>
|
||||
<sys:String x:Key="MainMenuActionsGetRoot">启用Root账户</sys:String>
|
||||
|
||||
<sys:String x:Key="MainMenuLanguage">语言(Language)</sys:String>
|
||||
<sys:String x:Key="MainMenuLanguageEn">English</sys:String>
|
||||
|
@ -75,17 +76,23 @@
|
|||
<sys:String x:Key="XrayDomain">域名</sys:String>
|
||||
<sys:String x:Key="XrayMarkDomain">伪装域名</sys:String>
|
||||
<sys:String x:Key="XrayUUID">UUID</sys:String>
|
||||
<sys:String x:Key="MultiUser">多用户</sys:String>
|
||||
<sys:String x:Key="MultiUserHelp">多个UUID用“,”分隔</sys:String>
|
||||
<sys:String x:Key="VlessWsPath">VLESS WS路径</sys:String>
|
||||
<sys:String x:Key="VlessKcpSeed">VLESS KCP Seed</sys:String>
|
||||
<sys:String x:Key="VlessKcpType">VLESS KCP伪装</sys:String>
|
||||
<sys:String x:Key="VlessKcpPort">VLESS KCP端口</sys:String>
|
||||
<sys:String x:Key="VlessRPCName">gRPC路径</sys:String>
|
||||
<sys:String x:Key="VlessRPCPort">gRPC端口</sys:String>
|
||||
<sys:String x:Key="VmessWsPath">VMESS WS路径</sys:String>
|
||||
<sys:String x:Key="VmessKcpSeed">VMESS KCP Seed</sys:String>
|
||||
<sys:String x:Key="VmessKcpType">VMESS KCP伪装</sys:String>
|
||||
<sys:String x:Key="VmessKcpPort">VMESS KCP端口</sys:String>
|
||||
<sys:String x:Key="SSPassword">SS密码</sys:String>
|
||||
<sys:String x:Key="SSMethods">SS加密方式</sys:String>
|
||||
<sys:String x:Key="SSPort">SS端口</sys:String>
|
||||
<sys:String x:Key="TrojanPassword">Trojan密码</sys:String>
|
||||
<sys:String x:Key="TrojanPort">Trojan端口</sys:String>
|
||||
<sys:String x:Key="XrayPort">xray端口</sys:String>
|
||||
<sys:String x:Key="XrayPortDefault">默认端口443,不建议修改</sys:String>
|
||||
|
||||
|
|
20
ProxySuper.WPF/Templates/NaiveProxy/caddy.service
Normal file
20
ProxySuper.WPF/Templates/NaiveProxy/caddy.service
Normal file
|
@ -0,0 +1,20 @@
|
|||
[Unit]
|
||||
Description=Caddy
|
||||
Documentation=https://caddyserver.com/docs/
|
||||
After=network.target network-online.target
|
||||
Requires=network-online.target
|
||||
|
||||
[Service]
|
||||
User=caddy
|
||||
Group=caddy
|
||||
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
|
||||
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
|
||||
TimeoutStopSec=5s
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=512
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"port": 2002,
|
||||
"listen": "127.0.0.1",
|
||||
"listen": "0.0.0.0",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
|
@ -11,15 +11,22 @@
|
|||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "grpc",
|
||||
"grpcSettings": {
|
||||
"serviceName": "",
|
||||
"network": "gun",
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"serverName": "domain",
|
||||
"alpn": [
|
||||
"h2"
|
||||
],
|
||||
"certificates": [
|
||||
{
|
||||
"certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt",
|
||||
"keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key"
|
||||
}
|
||||
]
|
||||
},
|
||||
"grpcSettings": {
|
||||
"serviceName": "service_name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
70
ProxySuper.WPF/Views/BrookEditorView.xaml
Normal file
70
ProxySuper.WPF/Views/BrookEditorView.xaml
Normal file
|
@ -0,0 +1,70 @@
|
|||
<views:MvxWindow x:Class="ProxySuper.WPF.Views.BrookEditorView"
|
||||
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
|
||||
xmlns:ctrl="clr-namespace:ProxySuper.WPF.Controls"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ProxySuper.WPF.Views"
|
||||
mc:Ignorable="d"
|
||||
BorderThickness="0,1,0,0"
|
||||
BorderBrush="#eee"
|
||||
Title="BrookEditorView" Height="600" Width="1000">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="310" />
|
||||
<ColumnDefinition Width="1" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0" Margin="10">
|
||||
<ctrl:HostControl />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Background="#EEE"></StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="2">
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="200" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="类型" Grid.Row="0" Grid.Column="0" />
|
||||
<ComboBox Width="200"
|
||||
Height="24"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
ItemsSource="{Binding Path=BrookTypes}"
|
||||
SelectedValue="{Binding CheckedBrookType,Mode=TwoWay}">
|
||||
</ComboBox>
|
||||
|
||||
<Label Content="端口" Grid.Row="1" Grid.Column="0" />
|
||||
<TextBox IsEnabled="{Binding EnablePort}" Text="{Binding Settings.Port}" Grid.Row="1" Grid.Column="1" />
|
||||
|
||||
<Label Content="密码" Grid.Row="2" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.Password}" Grid.Row="2" Grid.Column="1" />
|
||||
|
||||
<Label Content="域名" Grid.Row="3" Grid.Column="0" />
|
||||
<TextBox IsEnabled="{Binding EnableDomain}" Text="{Binding Settings.Domain}" Grid.Row="3" Grid.Column="1" />
|
||||
</Grid>
|
||||
|
||||
<Border BorderBrush="#eee" BorderThickness="0,1,0,0">
|
||||
<Button Content="{DynamicResource Save}"
|
||||
Command="{Binding SaveCommand}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Height="30"
|
||||
Width="100"
|
||||
Margin="40,20" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</views:MvxWindow>
|
30
ProxySuper.WPF/Views/BrookEditorView.xaml.cs
Normal file
30
ProxySuper.WPF/Views/BrookEditorView.xaml.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using MvvmCross.Platforms.Wpf.Presenters.Attributes;
|
||||
using MvvmCross.Platforms.Wpf.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace ProxySuper.WPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// BrookEditorView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
[MvxWindowPresentation(Identifier = nameof(XrayEditorView), Modal = false)]
|
||||
public partial class BrookEditorView : MvxWindow
|
||||
{
|
||||
public BrookEditorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@
|
|||
<MenuItem Padding="0,5" Header="Xray" Command="{Binding AddXrayCommand}"></MenuItem>
|
||||
<MenuItem Padding="0,5" Header="Trojan-Go" Command="{Binding AddTrojanGoCommand}"></MenuItem>
|
||||
<MenuItem Padding="0,5" Header="NaiveProxy" Command="{Binding AddNaiveProxyCommand}"></MenuItem>
|
||||
<MenuItem Padding="0,5" Header="Brook" Command="{Binding AddBrookCommand}"></MenuItem>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem Header="{DynamicResource MainMenuActions}" Padding="10,3">
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
VerticalAlignment="Top"
|
||||
VerticalContentAlignment="Top"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Text="{Binding Path=OutputText}"
|
||||
/>
|
||||
|
||||
<StackPanel Margin="5" Orientation="Horizontal">
|
||||
|
|
|
@ -8,6 +8,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -71,6 +72,7 @@ namespace ProxySuper.WPF.Views
|
|||
{
|
||||
outShell += "\n";
|
||||
}
|
||||
ViewModel.CommandText += outShell;
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
|
@ -119,8 +121,19 @@ namespace ProxySuper.WPF.Views
|
|||
{
|
||||
Task.Factory.StartNew(OpenConnect);
|
||||
};
|
||||
base.Closed += SaveInstallLog;
|
||||
}
|
||||
|
||||
private void SaveInstallLog(object sender, EventArgs e)
|
||||
{
|
||||
if (!Directory.Exists("Logs"))
|
||||
{
|
||||
Directory.CreateDirectory("Logs");
|
||||
}
|
||||
|
||||
var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".naiveproxy.txt");
|
||||
File.WriteAllText(fileName, ViewModel.CommandText);
|
||||
}
|
||||
|
||||
private void OpenLink(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
VerticalAlignment="Top"
|
||||
VerticalContentAlignment="Top"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Text="{Binding Path=OutputText}"
|
||||
/>
|
||||
|
||||
<StackPanel Margin="5" Orientation="Horizontal">
|
||||
|
|
|
@ -9,6 +9,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -73,6 +74,7 @@ namespace ProxySuper.WPF.Views
|
|||
{
|
||||
outShell += "\n";
|
||||
}
|
||||
ViewModel.CommandText += outShell;
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
|
@ -121,8 +123,19 @@ namespace ProxySuper.WPF.Views
|
|||
{
|
||||
Task.Factory.StartNew(OpenConnect);
|
||||
};
|
||||
base.Closed += SaveInstallLog;
|
||||
}
|
||||
|
||||
private void SaveInstallLog(object sender, EventArgs e)
|
||||
{
|
||||
if (!Directory.Exists("Logs"))
|
||||
{
|
||||
Directory.CreateDirectory("Logs");
|
||||
}
|
||||
|
||||
var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".trojan-go.txt");
|
||||
File.WriteAllText(fileName, ViewModel.CommandText);
|
||||
}
|
||||
|
||||
private void OpenLink(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
|
|
@ -51,12 +51,12 @@
|
|||
<ctrl:VLESS_KCP_Control />
|
||||
</TabItem>
|
||||
|
||||
<!--<TabItem Width="200"
|
||||
<TabItem Width="200" Height="40"
|
||||
Tag="{x:Static models:XrayType.VLESS_gRPC}"
|
||||
IsEnabled="{Binding Checked_VLESS_gRPC}"
|
||||
IsEnabled="{Binding Checked_VLESS_gRPC}"
|
||||
Header="VLESS-gRPC">
|
||||
<ctrl:VLESS_gRPC_Control />
|
||||
</TabItem>-->
|
||||
</TabItem>
|
||||
|
||||
<!--<TabItem Width="200" Height="40"
|
||||
Tag="{x:Static models:XrayType.VMESS_TCP}"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
VerticalAlignment="Top"
|
||||
VerticalContentAlignment="Top"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Text="{Binding Path=OutputText}"
|
||||
/>
|
||||
|
||||
<StackPanel Margin="5" Orientation="Horizontal">
|
||||
|
|
|
@ -8,6 +8,7 @@ using Renci.SshNet;
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation.Peers;
|
||||
|
@ -45,6 +46,19 @@ namespace ProxySuper.WPF.Views
|
|||
{
|
||||
Task.Factory.StartNew(OpenConnect);
|
||||
};
|
||||
|
||||
base.Closed += SaveInstallLog;
|
||||
}
|
||||
|
||||
private void SaveInstallLog(object sender, EventArgs e)
|
||||
{
|
||||
if (!Directory.Exists("Logs"))
|
||||
{
|
||||
Directory.CreateDirectory("Logs");
|
||||
}
|
||||
|
||||
var fileName = Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".xary.txt");
|
||||
File.WriteAllText(fileName, ViewModel.CommandText);
|
||||
}
|
||||
|
||||
private SshClient _sshClient;
|
||||
|
@ -75,8 +89,8 @@ namespace ProxySuper.WPF.Views
|
|||
{
|
||||
outShell += "\n";
|
||||
}
|
||||
ViewModel.CommandText += outShell;
|
||||
|
||||
ViewModel.OutputText += outShell;
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
OutputTextBox.AppendText(outShell);
|
||||
|
@ -117,6 +131,8 @@ namespace ProxySuper.WPF.Views
|
|||
|
||||
}
|
||||
|
||||
#region 功能
|
||||
|
||||
private void OpenLink(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Hyperlink link = sender as Hyperlink;
|
||||
|
@ -187,6 +203,7 @@ namespace ProxySuper.WPF.Views
|
|||
}
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
70
README.md
70
README.md
|
@ -1,6 +1,6 @@
|
|||
# ProxySU
|
||||
V2ray, Xray,Trojan, NaiveProxy, Trojan-Go, ShadowsocksR(SSR),Shadowsocks-libev and Plugins,MTProto+TLS,BBR install tools for windows。
|
||||
V2ray,Xray,Trojan,NaiveProxy, Trojan-Go, ShadowsocksR(SSR),Shadowsocks-libev及相关插件,MTProto+TLS 一键安装工具。支持纯ipv6主机一键安装代理。
|
||||
V2ray, Xray,Trojan, NaiveProxy, Trojan-Go,BBR install tools for windows。
|
||||
V2ray,Xray,Trojan,NaiveProxy, Trojan-Go, 及相关插件。支持纯ipv6主机一键安装代理。
|
||||
BBR一键开启(仅支持CentOS8/Debian9/10/Ubuntu18.04及以上),支持语言:English、简体中文、正体(繁体)中文。
|
||||
|
||||
编译环境Visual Studio 2017 使用WPF界面。可一键安装V2ray、Xray,Trojan、NaiveProxy,Trojan-Go,ShadowsocksR(SSR),Shadowsocks-libev and Plugins、MTProto+TLS 后续还会再添加其他。
|
||||
|
@ -16,7 +16,6 @@ BBR一键开启(仅支持CentOS8/Debian9/10/Ubuntu18.04及以上),支持语
|
|||
##### ProxySU本着技术中立的原则,没有任何立场,也不持任何见解,更不涉及任何政治因素。ProxySU仅仅主张人的知情权,这是一项天赋人权,也是各国宪法所保障的最基本人权。知情权包含对同一事物正负两方面评价的知情,至于相信哪个,由人自己选择。正如李文亮医生临终所言:一个正常的社会是不应该只有一种声音的。如果真的存在对某一事物只有一种声音的评价,无论其评价是正面还是负面,都是要慎重对待,并需要重新审视的。
|
||||
|
||||
##### Xray可一键安装的模式有:
|
||||
当前Xray是V2Ray的超集,未来Xray会有不同的发展方向。
|
||||
* VLESS+TCP+XTLS+Web (最新黑科技)
|
||||
* Vless+tcp+TLS+Web (新热门协议)
|
||||
* VLESS+WebSocket+TLS+Web
|
||||
|
@ -30,57 +29,10 @@ BBR一键开启(仅支持CentOS8/Debian9/10/Ubuntu18.04及以上),支持语
|
|||
* WebSocket+TLS
|
||||
* WebSocket+TLS+Web
|
||||
* WebSocket+TLS(自签证书)
|
||||
* http2
|
||||
* http2+TLS+Web
|
||||
* http2(自签证书)
|
||||
* mKCP及各种伪装
|
||||
* QUIC及各种伪装。
|
||||
|
||||
##### V2ray可一键安装的模式有:
|
||||
|
||||
* Vless+tcp+TLS+Web (新热门协议)
|
||||
* VLESS+WebSocket+TLS+Web
|
||||
* VLESS+http2+TLS+Web
|
||||
* VLESS+mKCP
|
||||
* tcp
|
||||
* tcp+http伪装
|
||||
* tcp+TLS
|
||||
* tcp+TLS (自签证书)
|
||||
* WebSocket
|
||||
* WebSocket+TLS
|
||||
* WebSocket+TLS+Web
|
||||
* WebSocket+TLS(自签证书)
|
||||
* http2
|
||||
* http2+TLS+Web
|
||||
* http2(自签证书)
|
||||
* mKCP及各种伪装
|
||||
* QUIC及各种伪装。
|
||||
注:mKCP和QUIC模式使用udp协议,可以有效减少网络延时,有加速的作用,但在网络管控严厉时期,会导致端口或IP被封。以上模式最推荐的是WebSocket+TLS+Web 和http2+TLS+Web 需要有一个域名。如果能加上CDN则稳定性更好。加上CDN后,是加速还是减速,与线路有关,也与当前所用的CDN的IP有关,这里是一个筛选CDN最优IP的工具: [better-cloudflare-ip](https://github.com/badafans/better-cloudflare-ip) -----适用于使用 Cloudflare 的CDN。
|
||||
|
||||
##### Trojan 可一键安装:
|
||||
* Trojan + TLS + Web
|
||||
|
||||
##### Trojan-Go 可一键安装:
|
||||
* Trojan-Go + TLS + Web
|
||||
* Trojan-Go + WebSocket + TLS + Web
|
||||
|
||||
##### NaiveProxy一键安装:
|
||||
* NaiveProxy + TLS +Web
|
||||
|
||||
##### ShadowsocksR(SSR)一键安装:
|
||||
* SSR+TLS+Caddy
|
||||
|
||||
##### SS (Shadowsocks-libev) 及相关插件一键安装:
|
||||
* SS 经典模式
|
||||
* SS+WebSocket+TLS+Caddy(Web前置) (推荐)
|
||||
* SS+WebSocket
|
||||
* SS+QUIC
|
||||
* SS+kcptun
|
||||
* SS+obfs+http+Web
|
||||
* SS+obfs+TLS+Web
|
||||
|
||||
##### MTProto+TLS电报代理一键安装:
|
||||
* MTProto+TLS
|
||||
##### 上传自有证书 #####
|
||||
需要将crt和key文件打包成zip,在安装界面选择“上传自有证书”
|
||||
|
||||
##### 支持的VPS系统为:
|
||||
* CentOS 7/8
|
||||
|
@ -183,18 +135,6 @@ Let's Encrypt证书申请频率的限制
|
|||
* [Qv2ray (windows)](https://github.com/Qv2ray/Qv2ray)客户端导入二维码和URL
|
||||
注:这里多说几句NaiveProxy,现在墙越来越高,翻墙软件需要隐藏访问目标网址和加密数据的同时,还要隐藏自己的流量特征,不被识别出是代理流量。V2ray,Trojan都有其自己的实现。而NaiveProxy是配合Caddy的一个http.forwardproxy插件,插件有防嗅探,转发流量的功能。代理http流量很完美,但是在代理https流量时,会出现长度特征,NaiverProxy则弥补了这一点,消除了代理https时的流量特征,另外还应用 [Chrome's network stack](https://www.chromium.org/developers/design-documents/network-stack).更好的消除TLS的指纹特征。详细介绍请看项目官方介绍:[NaiveProxy官方文档](https://github.com/klzgrad/naiveproxy)。有兴趣的不妨一试。
|
||||
|
||||
###### SSR+TLS+Caddy 模式目前已支持生成用于
|
||||
|
||||
* [ShadowsocksR (windows)](https://github.com/shadowsocksrr/shadowsocksr-csharp/releases)客户端导入二维码和URL
|
||||
* [SSRR(Android)](https://github.com/shadowsocksrr/shadowsocksr-android/releases)导入二维码和URL
|
||||
* [Shadowrocket (ios)](https://apps.apple.com/us/app/shadowrocket/id932747118)导入二维码和URL
|
||||
|
||||
###### SS (Shadowsocks-libev) 目前已支持生成用于
|
||||
|
||||
* [Shadowsocks (windows)](https://github.com/shadowsocks/shadowsocks-windows/releases)客户端导入二维码和URL
|
||||
* [shadowsocks(Android)](https://github.com/shadowsocks/shadowsocks-android/releases)导入二维码和URL
|
||||
* [Shadowrocket (ios)](https://apps.apple.com/us/app/shadowrocket/id932747118)导入二维码和URL
|
||||
|
||||
## 程序工作流程:
|
||||
1. 使用[SSH.NET](https://github.com/sshnet/SSH.NET)登录远程主机
|
||||
2. 根据选择的代理来调用相应的脚本:
|
||||
|
@ -204,8 +144,6 @@ Let's Encrypt证书申请频率的限制
|
|||
* 选择Trojan-Go,则调用本项目内的trojan-go.sh安装, `curl -o /tmp/trojan-go.sh https://raw.githubusercontent.com/proxysu/shellscript/master/trojan-go.sh` `yes | bash /tmp/trojan-go.sh -f` 安装Trojan-GO。
|
||||
* 选择NaiveProxy,先安装Caddy2,方法源自[Caddy官方文档](https://caddyserver.com/docs/download)。再用自编译的Caddy2(带forward_proxy插件)替换原来的Caddy运行文件。自编译Caddy2文件方法源自[NaiveProxy官方文档](https://github.com/klzgrad/naiveproxy#setup)。
|
||||
* 选择SSR+TLS+Caddy模式,则调用本项目内的ssr.sh安装, `curl -o /tmp/ssr.sh https://raw.githubusercontent.com/proxysu/shellscript/master/ssr/ssr.sh` `yes | bash /tmp/ssr.sh -f` 安装SSR。
|
||||
* 选择Shadowsocks-libev与插件模式,则调用本项目内的ss-install.sh安装,`curl -o /tmp/install.sh https://raw.githubusercontent.com/proxysu/shellscript/master/ss/ss-install.sh` `yes | bash /tmp/install.sh`
|
||||
* 先择MTProto+TLS模式,则调用本项目内的mtg_install.sh安装,`curl -o /tmp/mtg_install.sh https://raw.githubusercontent.com/proxysu/shellscript/master/MTProto/mtg_install.sh` `yes | bash /tmp/mtg_install.sh`
|
||||
3. 根据选择读取相应配置模板,调用[Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json)生成相应配置文件,并上传到服务器。所有模板及配置文件 [在这里](https://github.com/proxysu/windows/tree/master/TemplateConfg)
|
||||
4. 如果使用WebSocket+TLS+Web/http2+TLS+Web/Trojan+TLS+Web/Trojan-go+TLS+Web/SSR+TLS+Caddy/SS+WebSocket+TLS+Caddy/SS+obfs+http+Web/SS+obfs+TLS+Web 模式,则安装Caddy2,方法源自[Caddy官方文档](https://caddyserver.com/docs/download)。
|
||||
5. 如果使用Http2/tcp+TLS/WebSocket+TLS/Trojan+TLS+Web/Trojan-go+TLS+Web/SS+QUIC模式,则调用 `curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | INSTALLONLINE=1 sh` 安装acme.sh,使用acme.sh申请证书.
|
||||
|
|
Loading…
Add table
Reference in a new issue