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