mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-25 06:36:08 +03:00
update
This commit is contained in:
parent
995d9ff435
commit
6c79b07d3c
@ -84,7 +84,7 @@ namespace ProxySuper.Core.Models
|
||||
if (Type == ProjectType.V2ray)
|
||||
{
|
||||
StringBuilder strBuilder = new StringBuilder();
|
||||
XraySettings.Types.ForEach(type =>
|
||||
V2raySettings.Types.ForEach(type =>
|
||||
{
|
||||
var link = ShareLink.Build(type, V2raySettings);
|
||||
strBuilder.AppendLine(link);
|
||||
|
@ -179,8 +179,11 @@ namespace ProxySuper.Core.Services
|
||||
}
|
||||
|
||||
Progress.Desc = "上传Caddy配置文件";
|
||||
UploadCaddySettings();
|
||||
UploadCaddySettings(useCustomWeb: true);
|
||||
Progress.Percentage = 90;
|
||||
|
||||
Progress.Desc = "重启caddy服务";
|
||||
RunCmd("systemctl restart caddy");
|
||||
Progress.Percentage = 100;
|
||||
Progress.Desc = "上传静态网站成功";
|
||||
}
|
||||
|
@ -766,7 +766,7 @@ namespace ProxySuper.Core.Services
|
||||
{
|
||||
return new ConnectionInfo(
|
||||
host: _host.Address,
|
||||
username: _host.Password,
|
||||
username: _host.UserName,
|
||||
authenticationMethods: authMethods.ToArray());
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,9 @@ namespace ProxySuper.Core.Services
|
||||
Progress.Step = $"{index++}. 启动BBR";
|
||||
EnableBBR();
|
||||
|
||||
Progress.Step = $"{index++}. 重启caddy服务";
|
||||
RunCmd("systemctl restart caddy");
|
||||
|
||||
Progress.Desc = "启用Trojan-Go开机启动";
|
||||
RunCmd("systemctl enable trojan-go");
|
||||
RunCmd("systemctl restart trojan-go");
|
||||
@ -156,6 +159,11 @@ namespace ProxySuper.Core.Services
|
||||
|
||||
Progress.Desc = "更新配置文件";
|
||||
UploadTrojanGoSettings();
|
||||
Progress.Percentage = 70;
|
||||
|
||||
Progress.Desc = "重启caddy服务";
|
||||
RunCmd("systemctl restart caddy");
|
||||
Progress.Percentage = 80;
|
||||
|
||||
Progress.Desc = "重启Trojan-Go服务器";
|
||||
RunCmd("systemctl restart trojan-go");
|
||||
@ -313,8 +321,11 @@ namespace ProxySuper.Core.Services
|
||||
}
|
||||
|
||||
Progress.Desc = "上传Caddy配置文件";
|
||||
UploadCaddySettings();
|
||||
UploadCaddySettings(useCustomWeb: true);
|
||||
Progress.Percentage = 90;
|
||||
|
||||
Progress.Desc = "重启caddy服务";
|
||||
RunCmd("systemctl restart caddy");
|
||||
Progress.Percentage = 100;
|
||||
Progress.Desc = "上传静态网站成功";
|
||||
}
|
||||
@ -334,7 +345,6 @@ namespace ProxySuper.Core.Services
|
||||
RunCmd("mv /etc/caddy/Caddyfile /etc/caddy/Caddyfile.back");
|
||||
}
|
||||
UploadFile(stream, "/etc/caddy/Caddyfile");
|
||||
RunCmd("systemctl restart caddy");
|
||||
}
|
||||
|
||||
private void InstallTrojanGo()
|
||||
@ -356,7 +366,7 @@ namespace ProxySuper.Core.Services
|
||||
{
|
||||
Progress.Desc = "安装TLS证书";
|
||||
InstallCert(
|
||||
dirPath: "/usr/local/etc/trojan-go",
|
||||
dirPath: "/usr/local/etc/trojan-go/ssl",
|
||||
certName: "trojan-go.crt",
|
||||
keyName: "trojan-go.key");
|
||||
}
|
||||
|
@ -220,8 +220,8 @@ namespace ProxySuper.Core.Services
|
||||
{
|
||||
var ssBound = GetBound("Shadowsocks-AEAD.json");
|
||||
ssBound.port = parameters.ShadowSocksPort;
|
||||
ssBound.settings.clients[0].password = parameters.ShadowSocksPassword;
|
||||
ssBound.settings.clients[0].method = parameters.ShadowSocksMethod;
|
||||
ssBound.settings.password = parameters.ShadowSocksPassword;
|
||||
ssBound.settings.method = parameters.ShadowSocksMethod;
|
||||
xrayConfig.inbounds.Add(JToken.FromObject(ssBound));
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ namespace ProxySuper.Core.Services
|
||||
|
||||
Progress.Desc = "重启V2ray服务";
|
||||
RunCmd("systemctl restart caddy");
|
||||
RunCmd("systemctl restart V2ray");
|
||||
RunCmd("systemctl restart v2ray");
|
||||
|
||||
Progress.Percentage = 100;
|
||||
Progress.Step = "安装成功";
|
||||
@ -348,6 +348,10 @@ namespace ProxySuper.Core.Services
|
||||
|
||||
Progress.Desc = "上传Web配置文件";
|
||||
UploadCaddyFile(useCustomWeb: true);
|
||||
Progress.Percentage = 90;
|
||||
|
||||
Progress.Desc = "重启caddy服务";
|
||||
RunCmd("systemctl restart caddy");
|
||||
Progress.Percentage = 100;
|
||||
|
||||
Progress.Desc = "上传静态网站成功";
|
||||
|
@ -223,8 +223,8 @@ namespace ProxySuper.Core.Services
|
||||
{
|
||||
var ssBound = GetBound("Shadowsocks-AEAD.json");
|
||||
ssBound.port = parameters.ShadowSocksPort;
|
||||
ssBound.settings.clients[0].password = parameters.ShadowSocksPassword;
|
||||
ssBound.settings.clients[0].method = parameters.ShadowSocksMethod;
|
||||
ssBound.settings.password = parameters.ShadowSocksPassword;
|
||||
ssBound.settings.method = parameters.ShadowSocksMethod;
|
||||
xrayConfig.inbounds.Add(JToken.FromObject(ssBound));
|
||||
}
|
||||
|
||||
|
@ -350,6 +350,10 @@ namespace ProxySuper.Core.Services
|
||||
|
||||
Progress.Desc = "上传Web配置文件";
|
||||
UploadCaddyFile(useCustomWeb: true);
|
||||
Progress.Percentage = 90;
|
||||
|
||||
Progress.Desc = "重启caddy服务";
|
||||
RunCmd("systemctl restart caddy");
|
||||
Progress.Percentage = 100;
|
||||
|
||||
Progress.Desc = "上传静态网站成功";
|
||||
|
@ -8,8 +8,8 @@
|
||||
""
|
||||
],
|
||||
"ssl": {
|
||||
"cert": "/usr/local/etc/trojan-go/trojan-go.crt",
|
||||
"key": "/usr/local/etc/trojan-go/trojan-go.key",
|
||||
"cert": "/usr/local/etc/trojan-go/ssl/trojan-go.crt",
|
||||
"key": "/usr/local/etc/trojan-go/ssl/trojan-go.key",
|
||||
"sni": "example.com"
|
||||
},
|
||||
"websocket": {
|
||||
|
@ -2,12 +2,8 @@
|
||||
"port": 12345,
|
||||
"protocol": "shadowsocks",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"password": "",
|
||||
"method": "aes-128-gcm"
|
||||
}
|
||||
],
|
||||
"method": "aes-128-gcm",
|
||||
"network": "tcp,udp"
|
||||
}
|
||||
}
|
@ -16,13 +16,12 @@
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"alpn": [
|
||||
"h2",
|
||||
"http/1.1"
|
||||
],
|
||||
"certificates": [
|
||||
{
|
||||
"certificateFile": "/usr/local/etc/v2ray/ssl/xray_ssl.crt",
|
||||
"keyFile": "/usr/local/etc/v2ray/ssl/xray_ssl.key"
|
||||
"certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt",
|
||||
"keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -20,8 +20,8 @@
|
||||
],
|
||||
"certificates": [
|
||||
{
|
||||
"certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt",
|
||||
"keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key"
|
||||
"certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt",
|
||||
"keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -2,12 +2,8 @@
|
||||
"port": 12345,
|
||||
"protocol": "shadowsocks",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"password": "",
|
||||
"method": "aes-128-gcm"
|
||||
}
|
||||
],
|
||||
"method": "aes-128-gcm",
|
||||
"network": "tcp,udp"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user