diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml index 5267ef5..944709d 100644 --- a/ProxySU/MainWindow.xaml +++ b/ProxySU/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ProxySU" mc:Ignorable="d" - Title="ProxySU - v2.2.2" Height="675" Width="620"> + Title="ProxySU - v2.2.3" Height="675" Width="620"> @@ -77,10 +77,10 @@ - - + + - + @@ -94,12 +94,12 @@ - + - - + + @@ -139,13 +139,13 @@ - + - + - + diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index 666e703..4d3fdea 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -129,6 +129,7 @@ namespace ProxySU } #region 端口数字防错代码,密钥选择代码 检测新版本代码 + //检测ProxySU新版本 private void TestLatestVersionProxySU(TextBlock TextBlockLastVersionProxySU,TextBlock TextBlockNewVersionReminder,Button ButtonUpgradeProxySU) { @@ -138,17 +139,37 @@ namespace ProxySU JObject lastVerJsonObj = JObject.Parse(strJson); string lastVersion = (string)lastVerJsonObj["tag_name"];//得到远程版本信息 + string lastVersionNoV = lastVersion.Replace("v", String.Empty); + Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; - string cerversion = "v" + version.ToString().Substring(0, 5); //获取本地版本信息 + string cerversion = version.ToString().Substring(0, 5); //获取本地版本信息 + //MessageBox.Show(cerversion); + string[] lastVerComp = lastVersionNoV.Split('.'); + string[] localVerComp = cerversion.Split('.'); //版本信息不相同,则认为新版本发布,显示出新版本信息及更新提醒,下载按钮 - if (String.Equals(lastVersion, cerversion) == false) + if (int.Parse(lastVerComp[0]) > int.Parse(localVerComp[0])) { TextBlockLastVersionProxySU.Dispatcher.BeginInvoke(updateNewVersionProxySUAction, TextBlockLastVersionProxySU, TextBlockNewVersionReminder, ButtonUpgradeProxySU, lastVersion); + return; + } + else if (int.Parse(lastVerComp[0]) == int.Parse(localVerComp[0])) + { + if (int.Parse(lastVerComp[1]) > int.Parse(localVerComp[1])) + { + TextBlockLastVersionProxySU.Dispatcher.BeginInvoke(updateNewVersionProxySUAction, TextBlockLastVersionProxySU, TextBlockNewVersionReminder, ButtonUpgradeProxySU, lastVersion); + return; + } + else if (int.Parse(lastVerComp[1]) == int.Parse(localVerComp[1])) + { + if (int.Parse(lastVerComp[2]) > int.Parse(localVerComp[2])) + { + TextBlockLastVersionProxySU.Dispatcher.BeginInvoke(updateNewVersionProxySUAction, TextBlockLastVersionProxySU, TextBlockNewVersionReminder, ButtonUpgradeProxySU, lastVersion); + return; + } + } } - } - } //下载最新版ProxySU @@ -833,11 +854,7 @@ namespace ProxySU return; } - //读取模板配置 - - string serverConfig=""; //服务端配置文件 - string clientConfig = ""; //生成的客户端配置文件 - string upLoadPath = "/usr/local/etc/v2ray/config.json"; //服务端文件位置 + //生成客户端配置时,连接的服务主机的IP或者域名 if (String.IsNullOrEmpty(ReceiveConfigurationParameters[4])==true) { @@ -851,98 +868,33 @@ namespace ProxySU MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ChooseTemplate").ToString()); return; } - else if (String.Equals(ReceiveConfigurationParameters[0], "TCP")) + else if (String.Equals(ReceiveConfigurationParameters[0], "TCP") + || String.Equals(ReceiveConfigurationParameters[0], "TCPhttp") + || String.Equals(ReceiveConfigurationParameters[0], "tcpTLSselfSigned") + || String.Equals(ReceiveConfigurationParameters[0], "webSocket") + || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned") + || String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned") + || ReceiveConfigurationParameters[0].Contains("mKCP") + || ReceiveConfigurationParameters[0].Contains("Quic")) { testDomain = false; - serverConfig = "TemplateConfg\\tcp_server_config.json"; - clientConfig = "TemplateConfg\\tcp_client_config.json"; + } - else if (String.Equals(ReceiveConfigurationParameters[0], "TCPhttp")) - { - testDomain = false; - serverConfig = "TemplateConfg\\tcp_http_server_config.json"; - clientConfig = "TemplateConfg\\tcp_http_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "tcpTLS")) + else if (String.Equals(ReceiveConfigurationParameters[0], "tcpTLS") + || String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb") + || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web") + || String.Equals(ReceiveConfigurationParameters[0], "Http2") + || String.Equals(ReceiveConfigurationParameters[0], "http2Web")) { testDomain = true; - serverConfig = "TemplateConfg\\tcp_TLS_server_config.json"; - clientConfig = "TemplateConfg\\tcp_TLS_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "tcpTLSselfSigned")) - { - testDomain = false; - serverConfig = "TemplateConfg\\tcpTLSselfSigned_server_config.json"; - clientConfig = "TemplateConfg\\tcpTLSselfSigned_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb")) - { - testDomain = true; - serverConfig = "TemplateConfg\\tcp_vless_tls_caddy_server_config.json"; - clientConfig = "TemplateConfg\\tcp_vless_tls_caddy_cilent_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "webSocket")) - { - testDomain = false; - serverConfig = "TemplateConfg\\webSocket_server_config.json"; - clientConfig = "TemplateConfg\\webSocket_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS")) - { - testDomain = true; - serverConfig = "TemplateConfg\\WebSocket_TLS_server_config.json"; - clientConfig = "TemplateConfg\\WebSocket_TLS_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned")) - { - testDomain = false; - serverConfig = "TemplateConfg\\WebSocketTLS_selfSigned_server_config.json"; - clientConfig = "TemplateConfg\\WebSocketTLS_selfSigned_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web")) - { - testDomain = true; - serverConfig = "TemplateConfg\\WebSocketTLSWeb_server_config.json"; - clientConfig = "TemplateConfg\\WebSocketTLSWeb_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "Http2")) - { - testDomain = true; - serverConfig = "TemplateConfg\\http2_server_config.json"; - clientConfig = "TemplateConfg\\http2_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "http2Web")) - { - testDomain = true; - serverConfig = "TemplateConfg\\Http2Web_server_config.json"; - clientConfig = "TemplateConfg\\Http2Web_client_config.json"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned")) - { - testDomain = false; - serverConfig = "TemplateConfg\\Http2selfSigned_server_config.json"; - clientConfig = "TemplateConfg\\Http2selfSigned_client_config.json"; - } - //else if (String.Equals(ReceiveConfigurationParameters[0], "MkcpNone")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2SRTP")||String.Equals(ReceiveConfigurationParameters[0], "mKCPuTP")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WechatVideo")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2DTLS")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WireGuard")) - else if (ReceiveConfigurationParameters[0].Contains("mKCP")) - { - testDomain = false; - serverConfig = "TemplateConfg\\mkcp_server_config.json"; - clientConfig = "TemplateConfg\\mkcp_client_config.json"; + } - // else if (String.Equals(ReceiveConfigurationParameters[0], "QuicNone") || String.Equals(ReceiveConfigurationParameters[0], "QuicSRTP") || String.Equals(ReceiveConfigurationParameters[0], "Quic2uTP") || String.Equals(ReceiveConfigurationParameters[0], "QuicWechatVideo") || String.Equals(ReceiveConfigurationParameters[0], "QuicDTLS") || String.Equals(ReceiveConfigurationParameters[0], "QuicWireGuard")) - else if (ReceiveConfigurationParameters[0].Contains("Quic")) - { - testDomain = false; - serverConfig = "TemplateConfg\\quic_server_config.json"; - clientConfig = "TemplateConfg\\quic_client_config.json"; - } //Thread thread //SetUpProgressBarProcessing(0); //重置安装进度 installationDegree = 0; - Thread thread = new Thread(() => StartSetUpV2ray(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); + Thread thread = new Thread(() => StartSetUpV2ray(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); // Task task = new Task(() => StartSetUpRemoteHost(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); @@ -951,7 +903,7 @@ namespace ProxySU } //登录远程主机布署V2ray程序 - private void StartSetUpV2ray(ConnectionInfo connectionInfo,TextBlock textBlockName, ProgressBar progressBar, string serverConfig,string clientConfig,string upLoadPath) + private void StartSetUpV2ray(ConnectionInfo connectionInfo,TextBlock textBlockName, ProgressBar progressBar) { //******"正在登录远程主机......"****** @@ -1663,62 +1615,254 @@ namespace ProxySU //Thread.Sleep(1000); //生成服务端配置 - //serverConfig = @""; - using (StreamReader reader = File.OpenText(serverConfig)) + + //依据所选择的模式选择配置文件 + string logConfigJson = @"TemplateConfg\v2ray\server\00_log\00_log.json"; + string apiConfigJson = @"TemplateConfg\v2ray\server\01_api\01_api.json"; + string dnsConfigJson = @"TemplateConfg\v2ray\server\02_dns\02_dns.json"; + string routingConfigJson = @"TemplateConfg\v2ray\server\03_routing\03_routing.json"; + string policyConfigJson = @"TemplateConfg\v2ray\server\04_policy\04_policy.json"; + string inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\05_inbounds.json"; + string outboundsConfigJson = @"TemplateConfg\v2ray\server\06_outbounds\06_outbounds.json"; + string transportConfigJson = @"TemplateConfg\v2ray\server\07_transport\07_transport.json"; + string statsConfigJson = @"TemplateConfg\v2ray\server\08_stats\08_stats.json"; + string reverseConfigJson = @"TemplateConfg\v2ray\server\09_reverse\09_reverse.json"; + string baseConfigJson = @"TemplateConfg\v2ray\base.json"; + string serverRemoteConfig = @"/usr/local/etc/v2ray/config.json"; + + using (StreamReader reader = File.OpenText(baseConfigJson)) { JObject serverJson = (JObject)JToken.ReadFrom(new JsonTextReader(reader)); - //设置uuid - serverJson["inbounds"][0]["settings"]["clients"][0]["id"] = ReceiveConfigurationParameters[2]; - //除WebSocketTLSWeb/http2Web/VlessTcpTlsWeb模式外设置监听端口 - if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web") == false && String.Equals(ReceiveConfigurationParameters[0], "http2Web") == false && String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb") == false) + //读取"log" + using (StreamReader readerJson = File.OpenText(logConfigJson)) { - serverJson["inbounds"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]); + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["log"] = jObjectJson["log"]; } - if (String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb") == true) + //读取"api" + using (StreamReader readerJson = File.OpenText(apiConfigJson)) { - //设置Caddy随机监听的端口,用于Trojan-go,Trojan,V2Ray vless TLS - //Random random = new Random(); - randomCaddyListenPort = GetRandomPort(); - //指向Caddy监听的随机端口 - serverJson["inbounds"][0]["settings"]["fallbacks"][0]["dest"] = randomCaddyListenPort; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["api"] = jObjectJson["api"]; } - //TLS自签证书/WebSocketTLS(自签证书)/http2自签证书模式下,使用v2ctl 生成自签证书 - if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned") == true || String.Equals(ReceiveConfigurationParameters[0], "tcpTLSselfSigned") == true || String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned") == true) + //读取"dns" + using (StreamReader readerJson = File.OpenText(dnsConfigJson)) { - string selfSignedCa = client.RunCommand("/usr/local/bin/v2ctl cert --ca").Result; - JObject selfSignedCaJObject = JObject.Parse(selfSignedCa); - serverJson["inbounds"][0]["streamSettings"]["tlsSettings"]["certificates"][0] = selfSignedCaJObject; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["dns"] = jObjectJson["dns"]; } - //如果是WebSocketTLSWeb/WebSocketTLS/WebSocketTLS(自签证书)模式,则设置路径 - if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS") == true || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned") == true || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web") == true) + //读取"routing" + using (StreamReader readerJson = File.OpenText(routingConfigJson)) { - serverJson["inbounds"][0]["streamSettings"]["wsSettings"]["path"] = ReceiveConfigurationParameters[3]; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["routing"] = jObjectJson["routing"]; } - //如果是Http2/http2Web/http2自签模式下,设置路径 - if (String.Equals(ReceiveConfigurationParameters[0], "Http2") == true || String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true || String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned") == true) + //读取"policy" + using (StreamReader readerJson = File.OpenText(policyConfigJson)) { - serverJson["inbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3]; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["policy"] = jObjectJson["policy"]; } - //如果是Http2Web模式下,设置host - if (String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true) + //读取"inbounds" + using (StreamReader readerJson = File.OpenText(inboundsConfigJson)) { - // serverJson["inbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3]; - serverJson["inbounds"][0]["streamSettings"]["httpSettings"]["host"][0] = ReceiveConfigurationParameters[4]; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["inbounds"] = jObjectJson["inbounds"]; } - //mkcp模式下,设置伪装类型 - if (ReceiveConfigurationParameters[0].Contains("mKCP") == true) + //读取"outbounds" + using (StreamReader readerJson = File.OpenText(outboundsConfigJson)) { - serverJson["inbounds"][0]["streamSettings"]["kcpSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; - if (String.IsNullOrEmpty(ReceiveConfigurationParameters[6])==false ) + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["outbounds"] = jObjectJson["outbounds"]; + } + //读取"transport" + using (StreamReader readerJson = File.OpenText(transportConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["transport"] = jObjectJson["transport"]; + } + //读取"stats" + using (StreamReader readerJson = File.OpenText(statsConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["stats"] = jObjectJson["stats"]; + } + //读取"reverse" + using (StreamReader readerJson = File.OpenText(reverseConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + serverJson["reverse"] = jObjectJson["reverse"]; + } + + //依据安装模式读取相应模板 + if (String.Equals(ReceiveConfigurationParameters[0], "TCP")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\tcp_server_config.json"; + //serverConfig = "TemplateConfg\\tcp_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "TCPhttp")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\tcp_http_server_config.json"; + //serverConfig = "TemplateConfg\\tcp_http_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_http_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "tcpTLS")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\tcp_TLS_server_config.json"; + //serverConfig = "TemplateConfg\\tcp_TLS_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_TLS_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "tcpTLSselfSigned")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\tcpTLSselfSigned_server_config.json"; + //serverConfig = "TemplateConfg\\tcpTLSselfSigned_server_config.json"; + //clientConfig = "TemplateConfg\\tcpTLSselfSigned_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\tcp_vless_tls_caddy_server_config.json"; + //serverConfig = "TemplateConfg\\tcp_vless_tls_caddy_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_vless_tls_caddy_cilent_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "webSocket")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\webSocket_server_config.json"; + //serverConfig = "TemplateConfg\\webSocket_server_config.json"; + //clientConfig = "TemplateConfg\\webSocket_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\WebSocket_TLS_server_config.json"; + //serverConfig = "TemplateConfg\\WebSocket_TLS_server_config.json"; + //clientConfig = "TemplateConfg\\WebSocket_TLS_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\WebSocketTLS_selfSigned_server_config.json"; + //serverConfig = "TemplateConfg\\WebSocketTLS_selfSigned_server_config.json"; + //clientConfig = "TemplateConfg\\WebSocketTLS_selfSigned_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\WebSocketTLSWeb_server_config.json"; + //serverConfig = "TemplateConfg\\WebSocketTLSWeb_server_config.json"; + //clientConfig = "TemplateConfg\\WebSocketTLSWeb_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "Http2")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\http2_server_config.json"; + //serverConfig = "TemplateConfg\\http2_server_config.json"; + //clientConfig = @"TemplateConfg\http2_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "http2Web")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\Http2Web_server_config.json"; + //serverConfig = "TemplateConfg\\Http2Web_server_config.json"; + //clientConfig = "TemplateConfg\\Http2Web_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\Http2selfSigned_server_config.json"; + //serverConfig = "TemplateConfg\\Http2selfSigned_server_config.json"; + //clientConfig = "TemplateConfg\\Http2selfSigned_client_config.json"; + } + //else if (String.Equals(ReceiveConfigurationParameters[0], "MkcpNone")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2SRTP")||String.Equals(ReceiveConfigurationParameters[0], "mKCPuTP")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WechatVideo")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2DTLS")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WireGuard")) + else if (ReceiveConfigurationParameters[0].Contains("mKCP")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\mkcp_server_config.json"; + //serverConfig = "TemplateConfg\\mkcp_server_config.json"; + //clientConfig = "TemplateConfg\\mkcp_client_config.json"; + } + + // else if (String.Equals(ReceiveConfigurationParameters[0], "QuicNone") || String.Equals(ReceiveConfigurationParameters[0], "QuicSRTP") || String.Equals(ReceiveConfigurationParameters[0], "Quic2uTP") || String.Equals(ReceiveConfigurationParameters[0], "QuicWechatVideo") || String.Equals(ReceiveConfigurationParameters[0], "QuicDTLS") || String.Equals(ReceiveConfigurationParameters[0], "QuicWireGuard")) + else if (ReceiveConfigurationParameters[0].Contains("Quic")) + { + inboundsConfigJson = @"TemplateConfg\v2ray\server\05_inbounds\quic_server_config.json"; + //serverConfig = "TemplateConfg\\quic_server_config.json"; + //clientConfig = "TemplateConfg\\quic_client_config.json"; + } + + //读取"inbounds" + using (StreamReader readerJson = File.OpenText(inboundsConfigJson)) + { + JObject jObjectJsonTmp = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + var jObjectJson = (dynamic)jObjectJsonTmp; + + //Padavan路由固件服务端设置(因为客户端分流有问题所以在服务端弥补) + string sniffingAddServer = @"TemplateConfg\v2ray\server\05_inbounds\00_padavan_router.json"; + using (StreamReader readerSniffingJson = File.OpenText(sniffingAddServer)) { - serverJson["inbounds"][0]["streamSettings"]["kcpSettings"]["seed"] = ReceiveConfigurationParameters[6]; + JObject jObjectSniffingJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerSniffingJson)); + //JObject sniffing = (JObject)jObjectSniffingJson["sniffing"]; + //jObjectJson.Property("streamSettings").AddAfterSelf(new JProperty("sniffing", sniffing)); + //jObjectJson["inbounds"][0]["protocol"].AddAfterSelf(new JProperty("sniffing", sniffing)); + jObjectJson["inbounds"][0]["sniffing"] = jObjectSniffingJson["sniffing"]; + } - } - //quic模式下设置伪装类型及密钥 - if (ReceiveConfigurationParameters[0].Contains("Quic") == true) - { - serverJson["inbounds"][0]["streamSettings"]["quicSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; - serverJson["inbounds"][0]["streamSettings"]["quicSettings"]["key"] = ReceiveConfigurationParameters[6]; + + //设置uuid + jObjectJson["inbounds"][0]["settings"]["clients"][0]["id"] = ReceiveConfigurationParameters[2]; + //除WebSocketTLSWeb/http2Web/VlessTcpTlsWeb模式外设置监听端口 + if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web") == false + && String.Equals(ReceiveConfigurationParameters[0], "http2Web") == false + && String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb") == false) + { + jObjectJson["inbounds"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]); + } + if (String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb") == true) + { + //设置Caddy随机监听的端口,用于Trojan-go,Trojan,V2Ray vless TLS + //Random random = new Random(); + randomCaddyListenPort = GetRandomPort(); + //指向Caddy监听的随机端口 + jObjectJson["inbounds"][0]["settings"]["fallbacks"][0]["dest"] = randomCaddyListenPort; + } + //TLS自签证书/WebSocketTLS(自签证书)/http2自签证书模式下,使用v2ctl 生成自签证书 + if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned") == true + || String.Equals(ReceiveConfigurationParameters[0], "tcpTLSselfSigned") == true + || String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned") == true) + { + string selfSignedCa = client.RunCommand("/usr/local/bin/v2ctl cert --ca").Result; + JObject selfSignedCaJObject = JObject.Parse(selfSignedCa); + jObjectJson["inbounds"][0]["streamSettings"]["tlsSettings"]["certificates"][0] = selfSignedCaJObject; + } + //如果是WebSocketTLSWeb/WebSocketTLS/WebSocketTLS(自签证书)模式,则设置路径 + if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS") == true + || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned") == true + || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web") == true) + { + jObjectJson["inbounds"][0]["streamSettings"]["wsSettings"]["path"] = ReceiveConfigurationParameters[3]; + } + //如果是Http2/http2Web/http2自签模式下,设置路径 + if (String.Equals(ReceiveConfigurationParameters[0], "Http2") == true + || String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true + || String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned") == true) + { + jObjectJson["inbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3]; + } + //如果是Http2Web模式下,设置host + if (String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true) + { + // jObjectJson["inbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3]; + jObjectJson["inbounds"][0]["streamSettings"]["httpSettings"]["host"][0] = ReceiveConfigurationParameters[4]; + } + //mkcp模式下,设置伪装类型 + if (ReceiveConfigurationParameters[0].Contains("mKCP") == true) + { + jObjectJson["inbounds"][0]["streamSettings"]["kcpSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; + if (String.IsNullOrEmpty(ReceiveConfigurationParameters[6]) == false) + { + jObjectJson["inbounds"][0]["streamSettings"]["kcpSettings"]["seed"] = ReceiveConfigurationParameters[6]; + } + } + //quic模式下设置伪装类型及密钥 + if (ReceiveConfigurationParameters[0].Contains("Quic") == true) + { + jObjectJson["inbounds"][0]["streamSettings"]["quicSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; + jObjectJson["inbounds"][0]["streamSettings"]["quicSettings"]["key"] = ReceiveConfigurationParameters[6]; + } + serverJson["inbounds"] = jObjectJson["inbounds"]; } using (StreamWriter sw = new StreamWriter(@"config.json")) @@ -1726,8 +1870,8 @@ namespace ProxySU sw.Write(serverJson.ToString()); } } - //upLoadPath="/usr/local/etc/v2ray/config.json"; - UploadConfig(connectionInfo, @"config.json",upLoadPath); + //"/usr/local/etc/v2ray/config.json"; + UploadConfig(connectionInfo, @"config.json", serverRemoteConfig); File.Delete(@"config.json"); @@ -1754,7 +1898,13 @@ namespace ProxySU currentShellCommandResult = client.RunCommand(sshShellCommand).Result; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 - + //解决搬瓦工CentOS缺少问题 + sshShellCommand = $"{sshCmdInstall}automake autoconf libtool"; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 + currentShellCommandResult = client.RunCommand(sshShellCommand).Result; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + + sshShellCommand = @"curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | INSTALLONLINE=1 sh"; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 currentShellCommandResult = client.RunCommand(sshShellCommand).Result; @@ -1882,7 +2032,9 @@ namespace ProxySU } //如果是WebSocket+TLS+Web/http2Web/vlessTcpTlsWeb模式,需要安装Caddy - if (ReceiveConfigurationParameters[0].Contains("WebSocketTLS2Web") ==true || ReceiveConfigurationParameters[0].Contains("http2Web") == true || ReceiveConfigurationParameters[0].Contains("VlessTcpTlsWeb") == true) + if (ReceiveConfigurationParameters[0].Contains("WebSocketTLS2Web") ==true + || ReceiveConfigurationParameters[0].Contains("http2Web") == true + || ReceiveConfigurationParameters[0].Contains("VlessTcpTlsWeb") == true) { //****** "安装Caddy......" ******28 SetUpProgressBarProcessing(70); @@ -2054,7 +2206,7 @@ namespace ProxySU TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 //Thread.Sleep(1000); - + string serverConfig = ""; sshShellCommand = @"mv /etc/caddy/Caddyfile /etc/caddy/Caddyfile.bak"; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 currentShellCommandResult = client.RunCommand(sshShellCommand).Result; @@ -2062,17 +2214,17 @@ namespace ProxySU if (ReceiveConfigurationParameters[0].Contains("WebSocketTLS2Web") == true) { - serverConfig = "TemplateConfg\\WebSocketTLSWeb_server_config.caddyfile"; + serverConfig = @"TemplateConfg\v2ray\caddy\WebSocketTLSWeb.caddyfile"; } else if (ReceiveConfigurationParameters[0].Contains("http2Web") == true) { - serverConfig = "TemplateConfg\\Http2Web_server_config.caddyfile"; + serverConfig = @"TemplateConfg\v2ray\caddy\Http2Web.caddyfile"; } else if(ReceiveConfigurationParameters[0].Contains("VlessTcpTlsWeb")==true) { - serverConfig = "TemplateConfg\\trojan_caddy_config.caddyfile"; + serverConfig = @"TemplateConfg\v2ray\caddy\vlessTcpTlsWeb.caddyfile"; } - upLoadPath = "/etc/caddy/Caddyfile"; + string upLoadPath = "/etc/caddy/Caddyfile"; client.RunCommand("mv /etc/caddy/Caddyfile /etc/caddy/Caddyfile.bak"); UploadConfig(connectionInfo, serverConfig, upLoadPath); @@ -2333,6 +2485,29 @@ namespace ProxySU currentShellCommandResult = client.RunCommand(sshShellCommand).Result; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + sshShellCommand = @"sysctl net.ipv4.tcp_congestion_control | grep bbr"; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 + currentShellCommandResult = client.RunCommand(sshShellCommand).Result; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + + if (currentShellCommandResult.Contains("bbr") == true) + { + //****** "BBR启用成功!" ****** + currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBREnabledSuccess").ToString(); + textBlockName.Dispatcher.BeginInvoke(updateAction, textBlockName, progressBar, currentStatus); + currentShellCommandResult = currentStatus; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + + } + else + { + //****** "系统不满足启用BBR的条件,启用失败!" ****** + currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBRFailed").ToString(); + textBlockName.Dispatcher.BeginInvoke(updateAction, textBlockName, progressBar, currentStatus); + currentShellCommandResult = currentStatus; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + + } } else if (resultCmdTestBBR.Contains("bbr") == true) { @@ -2361,53 +2536,220 @@ namespace ProxySU currentShellCommandResult = currentStatus; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + logConfigJson = @"TemplateConfg\v2ray\client\00_log\00_log.json"; + apiConfigJson = @"TemplateConfg\v2ray\client\01_api\01_api.json"; + dnsConfigJson = @"TemplateConfg\v2ray\client\02_dns\02_dns.json"; + routingConfigJson = @"TemplateConfg\v2ray\client\03_routing\03_routing.json"; + policyConfigJson = @"TemplateConfg\v2ray\client\04_policy\04_policy.json"; + inboundsConfigJson = @"TemplateConfg\v2ray\client\05_inbounds\05_inbounds.json"; + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\06_outbounds.json"; + transportConfigJson = @"TemplateConfg\v2ray\client\07_transport\07_transport.json"; + statsConfigJson = @"TemplateConfg\v2ray\client\08_stats\08_stats.json"; + reverseConfigJson = @"TemplateConfg\v2ray\client\09_reverse\09_reverse.json"; + baseConfigJson = @"TemplateConfg\v2ray\base.json"; //Thread.Sleep(1000); if (!Directory.Exists("v2ray_config"))//如果不存在就创建file文件夹      { Directory.CreateDirectory("v2ray_config");//创建该文件夹   } - using (StreamReader reader = File.OpenText(clientConfig)) + using (StreamReader reader = File.OpenText(baseConfigJson)) { JObject clientJson = (JObject)JToken.ReadFrom(new JsonTextReader(reader)); - //设置客户端的地址/端口/id - clientJson["outbounds"][0]["settings"]["vnext"][0]["address"] = ReceiveConfigurationParameters[4]; - clientJson["outbounds"][0]["settings"]["vnext"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]); - clientJson["outbounds"][0]["settings"]["vnext"][0]["users"][0]["id"] = ReceiveConfigurationParameters[2]; - //设置WebSocket系统模式下的path - if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS") == true || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned") == true || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web") == true) + //读取"log" + using (StreamReader readerJson = File.OpenText(logConfigJson)) { - clientJson["outbounds"][0]["streamSettings"]["wsSettings"]["path"] = ReceiveConfigurationParameters[3]; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["log"] = jObjectJson["log"]; } - //设置http2模式下的path - if (String.Equals(ReceiveConfigurationParameters[0], "Http2") == true|| String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true || String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned") == true) + //读取"api" + using (StreamReader readerJson = File.OpenText(apiConfigJson)) { - clientJson["outbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3]; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["api"] = jObjectJson["api"]; } - //设置http2web模式下的host - if (String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true) + //读取"dns" + using (StreamReader readerJson = File.OpenText(dnsConfigJson)) { - clientJson["outbounds"][0]["streamSettings"]["httpSettings"]["host"][0] = ReceiveConfigurationParameters[4]; + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["dns"] = jObjectJson["dns"]; } - if (ReceiveConfigurationParameters[0].Contains("mKCP") ==true) + //读取"routing" + using (StreamReader readerJson = File.OpenText(routingConfigJson)) { - clientJson["outbounds"][0]["streamSettings"]["kcpSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; - if (String.IsNullOrEmpty(ReceiveConfigurationParameters[6]) == false) + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["routing"] = jObjectJson["routing"]; + } + //读取"policy" + using (StreamReader readerJson = File.OpenText(policyConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["policy"] = jObjectJson["policy"]; + } + //读取"inbounds" + using (StreamReader readerJson = File.OpenText(inboundsConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["inbounds"] = jObjectJson["inbounds"]; + } + //读取"outbounds" + using (StreamReader readerJson = File.OpenText(outboundsConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["outbounds"] = jObjectJson["outbounds"]; + } + //读取"transport" + using (StreamReader readerJson = File.OpenText(transportConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["transport"] = jObjectJson["transport"]; + } + //读取"stats" + using (StreamReader readerJson = File.OpenText(statsConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["stats"] = jObjectJson["stats"]; + } + //读取"reverse" + using (StreamReader readerJson = File.OpenText(reverseConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + clientJson["reverse"] = jObjectJson["reverse"]; + } + + if (String.Equals(ReceiveConfigurationParameters[0], "TCP")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\tcp_client_config.json"; + //serverConfig = "TemplateConfg\\tcp_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "TCPhttp")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\tcp_http_client_config.json"; + //serverConfig = "TemplateConfg\\tcp_http_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_http_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "tcpTLS")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\tcp_TLS_client_config.json"; + //serverConfig = "TemplateConfg\\tcp_TLS_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_TLS_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "tcpTLSselfSigned")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\tcpTLSselfSigned_client_config.json"; + //serverConfig = "TemplateConfg\\tcpTLSselfSigned_server_config.json"; + //clientConfig = "TemplateConfg\\tcpTLSselfSigned_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "VlessTcpTlsWeb")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\tcp_vless_tls_caddy_cilent_config.json"; + //serverConfig = "TemplateConfg\\tcp_vless_tls_caddy_server_config.json"; + //clientConfig = "TemplateConfg\\tcp_vless_tls_caddy_cilent_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "webSocket")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\webSocket_client_config.json"; + //serverConfig = "TemplateConfg\\webSocket_server_config.json"; + //clientConfig = "TemplateConfg\\webSocket_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\WebSocket_TLS_client_config.json"; + //serverConfig = "TemplateConfg\\WebSocket_TLS_server_config.json"; + //clientConfig = "TemplateConfg\\WebSocket_TLS_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\WebSocketTLS_selfSigned_client_config.json"; + //serverConfig = "TemplateConfg\\WebSocketTLS_selfSigned_server_config.json"; + //clientConfig = "TemplateConfg\\WebSocketTLS_selfSigned_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\WebSocketTLSWeb_client_config.json"; + //serverConfig = "TemplateConfg\\WebSocketTLSWeb_server_config.json"; + //clientConfig = "TemplateConfg\\WebSocketTLSWeb_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "Http2")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\http2_client_config.json"; + //serverConfig = "TemplateConfg\\http2_server_config.json"; + //clientConfig = @"TemplateConfg\http2_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "http2Web")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\Http2Web_client_config.json"; + //serverConfig = "TemplateConfg\\Http2Web_server_config.json"; + //clientConfig = "TemplateConfg\\Http2Web_client_config.json"; + } + else if (String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\Http2selfSigned_client_config.json"; + //serverConfig = "TemplateConfg\\Http2selfSigned_server_config.json"; + //clientConfig = "TemplateConfg\\Http2selfSigned_client_config.json"; + } + //else if (String.Equals(ReceiveConfigurationParameters[0], "MkcpNone")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2SRTP")||String.Equals(ReceiveConfigurationParameters[0], "mKCPuTP")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WechatVideo")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2DTLS")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WireGuard")) + else if (ReceiveConfigurationParameters[0].Contains("mKCP")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\mkcp_client_config.json"; + //serverConfig = "TemplateConfg\\mkcp_server_config.json"; + //clientConfig = "TemplateConfg\\mkcp_client_config.json"; + } + + // else if (String.Equals(ReceiveConfigurationParameters[0], "QuicNone") || String.Equals(ReceiveConfigurationParameters[0], "QuicSRTP") || String.Equals(ReceiveConfigurationParameters[0], "Quic2uTP") || String.Equals(ReceiveConfigurationParameters[0], "QuicWechatVideo") || String.Equals(ReceiveConfigurationParameters[0], "QuicDTLS") || String.Equals(ReceiveConfigurationParameters[0], "QuicWireGuard")) + else if (ReceiveConfigurationParameters[0].Contains("Quic")) + { + outboundsConfigJson = @"TemplateConfg\v2ray\client\06_outbounds\quic_client_config.json"; + //serverConfig = "TemplateConfg\\quic_server_config.json"; + //clientConfig = "TemplateConfg\\quic_client_config.json"; + } + + //读取"相应模板的outbounds" + using (StreamReader readerJson = File.OpenText(outboundsConfigJson)) + { + JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson)); + //设置客户端的地址/端口/id + jObjectJson["outbounds"][0]["settings"]["vnext"][0]["address"] = ReceiveConfigurationParameters[4]; + jObjectJson["outbounds"][0]["settings"]["vnext"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]); + jObjectJson["outbounds"][0]["settings"]["vnext"][0]["users"][0]["id"] = ReceiveConfigurationParameters[2]; + //设置WebSocket系统模式下的path + if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS") == true || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned") == true || String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web") == true) { - clientJson["outbounds"][0]["streamSettings"]["kcpSettings"]["seed"] = ReceiveConfigurationParameters[6]; + jObjectJson["outbounds"][0]["streamSettings"]["wsSettings"]["path"] = ReceiveConfigurationParameters[3]; + } + //设置http2模式下的path + if (String.Equals(ReceiveConfigurationParameters[0], "Http2") == true || String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true || String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned") == true) + { + jObjectJson["outbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3]; + } + //设置http2web模式下的host + if (String.Equals(ReceiveConfigurationParameters[0], "http2Web") == true) + { + jObjectJson["outbounds"][0]["streamSettings"]["httpSettings"]["host"][0] = ReceiveConfigurationParameters[4]; + } + if (ReceiveConfigurationParameters[0].Contains("mKCP") == true) + { + jObjectJson["outbounds"][0]["streamSettings"]["kcpSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; + if (String.IsNullOrEmpty(ReceiveConfigurationParameters[6]) == false) + { + jObjectJson["outbounds"][0]["streamSettings"]["kcpSettings"]["seed"] = ReceiveConfigurationParameters[6]; + } + } + if (ReceiveConfigurationParameters[0].Contains("Quic") == true) + { + jObjectJson["outbounds"][0]["streamSettings"]["quicSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; + jObjectJson["outbounds"][0]["streamSettings"]["quicSettings"]["key"] = ReceiveConfigurationParameters[6]; } - } - if (ReceiveConfigurationParameters[0].Contains("Quic") == true) - { - clientJson["outbounds"][0]["streamSettings"]["quicSettings"]["header"]["type"] = ReceiveConfigurationParameters[5]; - clientJson["outbounds"][0]["streamSettings"]["quicSettings"]["key"] = ReceiveConfigurationParameters[6]; - } + clientJson["outbounds"] = jObjectJson["outbounds"]; + } using (StreamWriter sw = new StreamWriter(@"v2ray_config\config.json")) { sw.Write(clientJson.ToString()); } + } //****** "V2Ray安装成功,祝你玩的愉快!!" ******40 SetUpProgressBarProcessing(100); @@ -2996,9 +3338,7 @@ namespace ProxySU MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorHostConnection").ToString()); return; } - string serverConfig = "TemplateConfg\\trojan-go_all_config.json"; //服务端配置文件 - string clientConfig = "TemplateConfg\\trojan-go_all_config.json"; //生成的客户端配置文件 - string upLoadPath = "/usr/local/etc/trojan-go/config.json"; //服务端文件位置 + if (String.IsNullOrEmpty(ReceiveConfigurationParameters[0]) == true) @@ -3014,13 +3354,13 @@ namespace ProxySU return; } installationDegree = 0; - Thread thread = new Thread(() => StartSetUpTrojanGo(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); + Thread thread = new Thread(() => StartSetUpTrojanGo(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); } //登录远程主机布署Trojan-Go程序 - private void StartSetUpTrojanGo(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar, string serverConfig, string clientConfig, string upLoadPath) + private void StartSetUpTrojanGo(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar) { //******"正在登录远程主机......"****** SetUpProgressBarProcessing(1); @@ -3633,6 +3973,9 @@ namespace ProxySU //Thread.Sleep(1000); + string serverConfig = @"TemplateConfg\trojan-go\trojan-go_all_config.json"; //服务端配置文件 + string upLoadPath = @"/usr/local/etc/trojan-go/config.json"; //服务端文件位置 + //生成服务端配置 using (StreamReader reader = File.OpenText(serverConfig)) { @@ -3689,6 +4032,12 @@ namespace ProxySU currentShellCommandResult = client.RunCommand(sshShellCommand).Result; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + //解决搬瓦工CentOS缺少问题 + sshShellCommand = $"{sshCmdInstall}automake autoconf libtool"; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 + currentShellCommandResult = client.RunCommand(sshShellCommand).Result; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + sshShellCommand = @"curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | INSTALLONLINE=1 sh"; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 currentShellCommandResult = client.RunCommand(sshShellCommand).Result; @@ -3939,7 +4288,7 @@ namespace ProxySU TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 - string caddyConfig = "TemplateConfg\\trojan_caddy_config.caddyfile"; + string caddyConfig = @"TemplateConfg\trojan-go\trojan-go.caddyfile"; upLoadPath = "/etc/caddy/Caddyfile"; UploadConfig(connectionInfo, caddyConfig, upLoadPath); @@ -4227,11 +4576,14 @@ namespace ProxySU TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 //Thread.Sleep(1000); + if (!Directory.Exists("trojan-go_config"))//如果不存在就创建file文件夹      { Directory.CreateDirectory("trojan-go_config");//创建该文件夹   } - clientConfig = "TemplateConfg\\trojan-go_all_config.json"; + + string clientConfig = @"TemplateConfg\trojan-go\trojan-go_all_config.json"; //生成的客户端配置文件 + using (StreamReader reader = File.OpenText(clientConfig)) { JObject clientJson = (JObject)JToken.ReadFrom(new JsonTextReader(reader)); @@ -4628,20 +4980,16 @@ namespace ProxySU ReceiveConfigurationParameters[1] = "443"; //传递密码(uuid) ReceiveConfigurationParameters[2] = TextBoxTrojanPassword.Text.ToString(); - - string serverConfig = "TemplateConfg\\trojan_server_config.json"; //服务端配置文件 - string clientConfig = "TemplateConfg\\trojan_client_config.json"; //生成的客户端配置文件 - string upLoadPath = "/usr/local/etc/trojan/config.json"; //服务端文件位置 - + //启动布署进程 installationDegree = 0; - Thread thread = new Thread(() => StartSetUpTrojan(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); + Thread thread = new Thread(() => StartSetUpTrojan(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); } //登录远程主机布署Trojan程序 - private void StartSetUpTrojan(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar, string serverConfig, string clientConfig, string upLoadPath) + private void StartSetUpTrojan(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar) { //******"正在登录远程主机......"****** SetUpProgressBarProcessing(1); @@ -5278,6 +5626,9 @@ namespace ProxySU //Thread.Sleep(1000); + string serverConfig = @"TemplateConfg\trojan\trojan_server_config.json"; //服务端配置文件 + string upLoadPath = @"/usr/local/etc/trojan/config.json"; //服务端文件位置 + //生成服务端配置 using (StreamReader reader = File.OpenText(serverConfig)) { @@ -5321,6 +5672,13 @@ namespace ProxySU currentShellCommandResult = client.RunCommand(sshShellCommand).Result; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + //解决搬瓦工CentOS缺少问题 + sshShellCommand = $"{sshCmdInstall}automake autoconf libtool"; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 + currentShellCommandResult = client.RunCommand(sshShellCommand).Result; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + + sshShellCommand = @"curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | INSTALLONLINE=1 sh"; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 currentShellCommandResult = client.RunCommand(sshShellCommand).Result; @@ -5573,8 +5931,8 @@ namespace ProxySU currentShellCommandResult = client.RunCommand(sshShellCommand).Result; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 - string caddyConfig = "TemplateConfg\\trojan_caddy_config.caddyfile"; - upLoadPath = "/etc/caddy/Caddyfile"; + string caddyConfig = @"TemplateConfg\trojan\trojan.caddyfile"; + upLoadPath = @"/etc/caddy/Caddyfile"; UploadConfig(connectionInfo, caddyConfig, upLoadPath); @@ -5864,8 +6222,8 @@ namespace ProxySU { Directory.CreateDirectory("trojan_config");//创建该文件夹   } - //string clientConfig = "TemplateConfg\\tcp_client_config.json"; - clientConfig = "TemplateConfg\\trojan_client_config.json"; + + string clientConfig = @"TemplateConfg\trojan\trojan_client_config.json"; //生成的客户端配置文件 using (StreamReader reader = File.OpenText(clientConfig)) { JObject clientJson = (JObject)JToken.ReadFrom(new JsonTextReader(reader)); @@ -6255,10 +6613,7 @@ namespace ProxySU MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorHostConnection").ToString()); return; } - string serverConfig = "TemplateConfg\\Naiveproxy_server_config.json"; //服务端配置文件 - string clientConfig = "TemplateConfg\\Naiveproxy_client_config.json"; //生成的客户端配置文件 - string upLoadPath = "/etc/caddy/config.json"; //Caddy服务端文件位置 - + //传递参数 ReceiveConfigurationParameters[4] = TextBoxNaiveHostDomain.Text;//传递域名 ReceiveConfigurationParameters[3] = TextBoxNaiveUser.Text;//传递用户名 @@ -6277,15 +6632,15 @@ namespace ProxySU ReceiveConfigurationParameters[7] = "http:\\/\\/" + TextBoxNaiveSites.Text; } } - + //启动布署进程 installationDegree = 0; - Thread thread = new Thread(() => StartSetUpNaive(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); + Thread thread = new Thread(() => StartSetUpNaive(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); } //登录远程主机布署NaiveProxy程序 - private void StartSetUpNaive(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar, string serverConfig, string clientConfig, string upLoadPath) + private void StartSetUpNaive(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar) { //******"正在登录远程主机......"****** SetUpProgressBarProcessing(1); @@ -6997,7 +7352,8 @@ namespace ProxySU //生成服务端配置 - string caddyConfig = "TemplateConfg\\Naiveproxy_server_config.json"; + + string caddyConfig = @"TemplateConfg\naive\naive_server_config.json"; using (StreamReader reader = File.OpenText(caddyConfig)) { JObject serverJson = (JObject)JToken.ReadFrom(new JsonTextReader(reader)); @@ -7016,7 +7372,7 @@ namespace ProxySU sw.Write(serverJson.ToString()); } } - upLoadPath = "/etc/caddy/config.json"; + string upLoadPath = @"/etc/caddy/config.json"; UploadConfig(connectionInfo, @"config.json", upLoadPath); File.Delete(@"config.json"); @@ -7334,6 +7690,7 @@ namespace ProxySU Directory.CreateDirectory("naive_config");//创建该文件夹   } + string clientConfig = @"TemplateConfg\naive\naive_client_config.json"; //生成的客户端配置文件 using (StreamReader reader = File.OpenText(clientConfig)) { JObject clientJson = (JObject)JToken.ReadFrom(new JsonTextReader(reader)); @@ -7461,18 +7818,14 @@ namespace ProxySU ReceiveConfigurationParameters[2] = TextBoxSSRPassword.Text.ToString(); - string serverConfig = ""; //服务端配置文件 - string clientConfig = ""; //生成的客户端配置文件 - string upLoadPath = ""; //服务端文件位置 - installationDegree = 0; - Thread thread = new Thread(() => StartSetUpSSR(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); + Thread thread = new Thread(() => StartSetUpSSR(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); } //登录远程主机布署SSR+TLS+Caddy程序 - private void StartSetUpSSR(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar, string serverConfig, string clientConfig, string upLoadPath) + private void StartSetUpSSR(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar) { //******"正在登录远程主机......"****** SetUpProgressBarProcessing(1); @@ -8114,7 +8467,7 @@ namespace ProxySU //生成服务端配置 //serverConfig = @"/etc/shadowsocks.json"; - upLoadPath = @"/etc/shadowsocks.json"; + string upLoadPath = @"/etc/shadowsocks.json"; //设置指向Caddy监听的随机端口 //Random random = new Random(); randomCaddyListenPort = GetRandomPort(); @@ -8262,8 +8615,8 @@ namespace ProxySU currentShellCommandResult = client.RunCommand(sshShellCommand).Result; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 - string caddyConfig = "TemplateConfg\\ssr_tls_caddy_config.caddyfile"; - upLoadPath = "/etc/caddy/Caddyfile"; + string caddyConfig = @"TemplateConfg\ssr\ssr_tls.caddyfile"; + upLoadPath = @"/etc/caddy/Caddyfile"; UploadConfig(connectionInfo, caddyConfig, upLoadPath); @@ -8737,9 +9090,6 @@ namespace ProxySU //读取模板配置 - string serverConfig = "TemplateConfg\\ss_server_config.json"; //服务端配置文件 - string clientConfig = ""; //生成的客户端配置文件 - string upLoadPath = "/etc/shadowsocks-libev/config.json"; //服务端文件位置 //生成客户端配置时,连接的服务主机的IP或者域名 if (String.IsNullOrEmpty(ReceiveConfigurationParameters[4]) == true) { @@ -8771,11 +9121,9 @@ namespace ProxySU testDomain = true; } - - //Thread thread installationDegree = 0; - Thread thread = new Thread(() => StartSetUpSS(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); + Thread thread = new Thread(() => StartSetUpSS(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); // Task task = new Task(() => StartSetUpRemoteHost(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, serverConfig, clientConfig, upLoadPath)); @@ -8784,7 +9132,7 @@ namespace ProxySU } //登录远程主机布署SS程序 - private void StartSetUpSS(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar, string serverConfig, string clientConfig, string upLoadPath) + private void StartSetUpSS(ConnectionInfo connectionInfo, TextBlock textBlockName, ProgressBar progressBar) { //******"正在登录远程主机......"****** @@ -9481,8 +9829,8 @@ namespace ProxySU string getIpv6 = client.RunCommand(@"wget -qO- -t1 -T2 ipv6.icanhazip.com").Result; //生成服务端配置 - //serverConfig = @""; - serverConfig = "TemplateConfg\\ss_server_config.json"; + + string serverConfig = @"TemplateConfg\ss\ss_server_config.json"; string ssPluginType = ""; using (StreamReader reader = File.OpenText(serverConfig)) { @@ -9648,8 +9996,8 @@ namespace ProxySU sw.Write(serverJson.ToString()); } } - //upLoadPath="/usr/local/etc/v2ray/config.json"; - upLoadPath = "/etc/shadowsocks-libev/config.json"; + + string upLoadPath = @"/etc/shadowsocks-libev/config.json"; UploadConfig(connectionInfo, @"config.json", upLoadPath); File.Delete(@"config.json"); @@ -9908,6 +10256,12 @@ namespace ProxySU currentShellCommandResult = client.RunCommand(sshShellCommand).Result; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + //解决搬瓦工CentOS缺少问题 + sshShellCommand = $"{sshCmdInstall}automake autoconf libtool"; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 + currentShellCommandResult = client.RunCommand(sshShellCommand).Result; + TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, currentShellCommandResult);//显示命令执行的结果 + sshShellCommand = @"curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | INSTALLONLINE=1 sh"; TextBoxMonitorCommandResults.Dispatcher.BeginInvoke(updateMonitorAction, TextBoxMonitorCommandResults, sshShellCommand);//显示执行的命令 @@ -10128,26 +10482,21 @@ namespace ProxySU if (String.Equals( ReceiveConfigurationParameters[0], "ObfsPluginHttpWebSS") == true) { - serverConfig = "TemplateConfg\\ss_obfs_http_web_config.caddyfile"; + serverConfig = @"TemplateConfg\ss\ss_obfs_http_web_config.caddyfile"; } - else if (String.Equals(ReceiveConfigurationParameters[0], "ObfsPluginHttpsWebSS") == true) + else if (String.Equals(ReceiveConfigurationParameters[0], "ObfsPluginHttpsWebSS") == true + || String.Equals(ReceiveConfigurationParameters[0], "GoQuietPluginSS") == true + || String.Equals(ReceiveConfigurationParameters[0], "CloakPluginSS") == true) { - serverConfig = "TemplateConfg\\ssr_tls_caddy_config.caddyfile"; + serverConfig = @"TemplateConfg\ss\ss_tls_caddy_config.caddyfile"; } else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSWebFrontSS") == true) { - serverConfig = "TemplateConfg\\WebSocketTLSWeb_server_config.caddyfile"; + serverConfig = @"TemplateConfg\ss\WebSocketTLSWeb.caddyfile"; } - else if (String.Equals(ReceiveConfigurationParameters[0], "GoQuietPluginSS") == true) - { - serverConfig = "TemplateConfg\\ssr_tls_caddy_config.caddyfile"; - } - else if (String.Equals(ReceiveConfigurationParameters[0], "CloakPluginSS") == true) - { - serverConfig = "TemplateConfg\\ssr_tls_caddy_config.caddyfile"; - } - upLoadPath = "/etc/caddy/Caddyfile"; - client.RunCommand("mv /etc/caddy/Caddyfile /etc/caddy/Caddyfile.bak"); + + upLoadPath = @"/etc/caddy/Caddyfile"; + UploadConfig(connectionInfo, serverConfig, upLoadPath); //设置Caddyfile文件中的tls 邮箱,在caddy2中已经不需要设置。 diff --git a/ProxySU/Properties/AssemblyInfo.cs b/ProxySU/Properties/AssemblyInfo.cs index ecb7493..16d0827 100644 --- a/ProxySU/Properties/AssemblyInfo.cs +++ b/ProxySU/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.2.2.0")] -[assembly: AssemblyFileVersion("2.2.2.0")] +[assembly: AssemblyVersion("2.2.3.0")] +[assembly: AssemblyFileVersion("2.2.3.0")] diff --git a/ProxySU/ProxySU.csproj b/ProxySU/ProxySU.csproj index 3f8fac2..e186f18 100644 --- a/ProxySU/ProxySU.csproj +++ b/ProxySU/ProxySU.csproj @@ -182,7 +182,7 @@ del "$(TargetDir)*.pdb" del "$(TargetDir)*.zip" mkdir "$(TargetDir)TemplateConfg" -copy /Y "$(TargetDir)..\..\..\TemplateConfg\*.*" "$(TargetDir)TemplateConfg\" +xcopy /Y /E /R "$(TargetDir)..\..\..\TemplateConfg\*.*" "$(TargetDir)TemplateConfg\" "$(TargetDir)..\..\..\7z\7z.exe" a $(TargetDir)Release.zip $(TargetDir) -xr!*config rmdir /S /Q "$(TargetDir)..\Beta" mkdir "$(TargetDir)..\Beta" diff --git a/ProxySU/Translations/ProxySU.en-US.xaml b/ProxySU/Translations/ProxySU.en-US.xaml index 4da5c47..8d350fd 100644 --- a/ProxySU/Translations/ProxySU.en-US.xaml +++ b/ProxySU/Translations/ProxySU.en-US.xaml @@ -269,6 +269,7 @@ Enable BBR... BBR has been enabled! The system does not meet the conditions for enabling BBR, and the enabling failed! + BBR is successfully activated! Generate client configuration... The installation is successful, Enjoy it!! Host login failed! diff --git a/ProxySU/Translations/ProxySU.zh-CN.xaml b/ProxySU/Translations/ProxySU.zh-CN.xaml index f33cd28..5819505 100644 --- a/ProxySU/Translations/ProxySU.zh-CN.xaml +++ b/ProxySU/Translations/ProxySU.zh-CN.xaml @@ -278,6 +278,7 @@ 正在启用BBR...... BBR已经启用了! 系统不满足启用BBR的条件,启用失败! + BBR 启用成功! 生成客户端配置...... 安装成功,祝你玩的愉快!! 主机登录失败! diff --git a/ProxySU/Translations/ProxySU.zh-TW.xaml b/ProxySU/Translations/ProxySU.zh-TW.xaml index 9b517fe..49d8d4f 100644 --- a/ProxySU/Translations/ProxySU.zh-TW.xaml +++ b/ProxySU/Translations/ProxySU.zh-TW.xaml @@ -271,6 +271,7 @@ 正在啟用BBR...... BBR已經啟用了! 系統不滿足啟用BBR的條件,啟用失敗! + BBR 啟用成功! 生成客戶端配置...... 安裝成功,祝你玩的愉快! ! 主機登錄失敗! diff --git a/ProxySU/bin/Beta/Beta.zip b/ProxySU/bin/Beta/Beta.zip index a9e5168..9920787 100644 Binary files a/ProxySU/bin/Beta/Beta.zip and b/ProxySU/bin/Beta/Beta.zip differ diff --git a/TemplateConfg/Http2Web_client_config.json b/TemplateConfg/Http2Web_client_config.json deleted file mode 100644 index 69e2d6e..0000000 --- a/TemplateConfg/Http2Web_client_config.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "h2", - "security": "tls", - "httpSettings": { - "path": null, - "host": [ - "" - ] - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/Http2Web_server_config.json b/TemplateConfg/Http2Web_server_config.json deleted file mode 100644 index dc1fab1..0000000 --- a/TemplateConfg/Http2Web_server_config.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "inbounds": [ - { - "port": 10000, - "listen": "127.0.0.1", - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "h2", - "security": "none", - "httpSettings": { - "path": null, - "host": [ - "" - ] - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/Http2selfSigned_client_config.json b/TemplateConfg/Http2selfSigned_client_config.json deleted file mode 100644 index a56ac4f..0000000 --- a/TemplateConfg/Http2selfSigned_client_config.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "h2", - "httpSettings": { - "path": null - }, - "security": "tls", - "tlsSettings": { - "allowInsecure": true - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/Http2selfSigned_server_config.json b/TemplateConfg/Http2selfSigned_server_config.json deleted file mode 100644 index e570eb1..0000000 --- a/TemplateConfg/Http2selfSigned_server_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "h2", - "security": "tls", - "tlsSettings": { - "certificates": [ - {} - ] - }, - "httpSettings": { - "path": null - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/WebSocketTLSWeb_client_config.json b/TemplateConfg/WebSocketTLSWeb_client_config.json deleted file mode 100644 index bc33578..0000000 --- a/TemplateConfg/WebSocketTLSWeb_client_config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "ws", - "security": "tls", - "wsSettings": { - "path": null - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/WebSocketTLSWeb_server_config.json b/TemplateConfg/WebSocketTLSWeb_server_config.json deleted file mode 100644 index 76f029b..0000000 --- a/TemplateConfg/WebSocketTLSWeb_server_config.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "inbounds": [ - { - "port": 10000, - "listen": "127.0.0.1", - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "ws", - "wsSettings": { - "path": null - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/WebSocketTLS_selfSigned_client_config.json b/TemplateConfg/WebSocketTLS_selfSigned_client_config.json deleted file mode 100644 index 28d0957..0000000 --- a/TemplateConfg/WebSocketTLS_selfSigned_client_config.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "ws", - "wsSettings": { - "path": null - }, - "security": "tls", - "tlsSettings": { - "allowInsecure": true - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/WebSocketTLS_selfSigned_server_config.json b/TemplateConfg/WebSocketTLS_selfSigned_server_config.json deleted file mode 100644 index e5dca55..0000000 --- a/TemplateConfg/WebSocketTLS_selfSigned_server_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "security": "tls", - "tlsSettings": { - "certificates": [ - {} - ] - }, - "network": "ws", - "wsSettings": { - "path": null - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/WebSocket_TLS_client_config.json b/TemplateConfg/WebSocket_TLS_client_config.json deleted file mode 100644 index e5f2c6f..0000000 --- a/TemplateConfg/WebSocket_TLS_client_config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "security": "tls", - "network": "ws", - "wsSettings": { - "path": null - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/WebSocket_TLS_server_config.json b/TemplateConfg/WebSocket_TLS_server_config.json deleted file mode 100644 index 64641e4..0000000 --- a/TemplateConfg/WebSocket_TLS_server_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "security": "tls", - "tlsSettings": { - "certificates": [ - { - "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", - "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" - } - ] - }, - "network": "ws", - "wsSettings": { - "path": null - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/http2_client_config.json b/TemplateConfg/http2_client_config.json deleted file mode 100644 index ab763bb..0000000 --- a/TemplateConfg/http2_client_config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "h2", - "security": "tls", - "httpSettings": { - "path": null - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/http2_server_config.json b/TemplateConfg/http2_server_config.json deleted file mode 100644 index 5334bf3..0000000 --- a/TemplateConfg/http2_server_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "h2", - "security": "tls", - "tlsSettings": { - "certificates": [ - { - "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", - "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" - } - ] - }, - "httpSettings": { - "path": null - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/mkcp_client_config.json b/TemplateConfg/mkcp_client_config.json deleted file mode 100644 index 28f650b..0000000 --- a/TemplateConfg/mkcp_client_config.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "kcp", - "kcpSettings": { - "uplinkCapacity": 100, - "downlinkCapacity": 100, - "congestion": true, - "header": { - "type": null - }, - "seed": null - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/mkcp_server_config.json b/TemplateConfg/mkcp_server_config.json deleted file mode 100644 index d34f632..0000000 --- a/TemplateConfg/mkcp_server_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "mkcp", - "kcpSettings": { - "uplinkCapacity": 100, - "downlinkCapacity": 100, - "congestion": true, - "header": { - "type": null - }, - "seed": null - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/Naiveproxy_client_config.json b/TemplateConfg/naive/naive_client_config.json similarity index 100% rename from TemplateConfg/Naiveproxy_client_config.json rename to TemplateConfg/naive/naive_client_config.json diff --git a/TemplateConfg/Naiveproxy_server_config.json b/TemplateConfg/naive/naive_server_config.json similarity index 100% rename from TemplateConfg/Naiveproxy_server_config.json rename to TemplateConfg/naive/naive_server_config.json diff --git a/TemplateConfg/quic_client_config.json b/TemplateConfg/quic_client_config.json deleted file mode 100644 index b532a1b..0000000 --- a/TemplateConfg/quic_client_config.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16 - } - ] - } - ] - }, - "streamSettings": { - "network": "quic", - "quicSettings": { - "security": "chacha20-poly1305", - "key": null, - "header": { - "type": null - } - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/quic_server_config.json b/TemplateConfg/quic_server_config.json deleted file mode 100644 index 2c6e66d..0000000 --- a/TemplateConfg/quic_server_config.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "quic", - "quicSettings": { - "security": "chacha20-poly1305", - "key": null, - "header": { - "type": null - } - } - } - } - - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} diff --git a/TemplateConfg/WebSocketTLSWeb_server_config.caddyfile b/TemplateConfg/ss/WebSocketTLSWeb.caddyfile similarity index 100% rename from TemplateConfg/WebSocketTLSWeb_server_config.caddyfile rename to TemplateConfg/ss/WebSocketTLSWeb.caddyfile diff --git a/TemplateConfg/ss_obfs_http_web_config.caddyfile b/TemplateConfg/ss/ss_obfs_http_web_config.caddyfile similarity index 100% rename from TemplateConfg/ss_obfs_http_web_config.caddyfile rename to TemplateConfg/ss/ss_obfs_http_web_config.caddyfile diff --git a/TemplateConfg/ss_server_config.json b/TemplateConfg/ss/ss_server_config.json similarity index 100% rename from TemplateConfg/ss_server_config.json rename to TemplateConfg/ss/ss_server_config.json diff --git a/TemplateConfg/ssr_tls_caddy_config.caddyfile b/TemplateConfg/ss/ss_tls_caddy_config.caddyfile similarity index 100% rename from TemplateConfg/ssr_tls_caddy_config.caddyfile rename to TemplateConfg/ss/ss_tls_caddy_config.caddyfile diff --git a/TemplateConfg/ssr/ssr_tls.caddyfile b/TemplateConfg/ssr/ssr_tls.caddyfile new file mode 100644 index 0000000..d27ff82 --- /dev/null +++ b/TemplateConfg/ssr/ssr_tls.caddyfile @@ -0,0 +1,8 @@ +https://##domain##:8800 { + root * /usr/share/caddy + file_server + ##sites## +} +##domain##:80 { + redir https://##domain##{uri} +} \ No newline at end of file diff --git a/TemplateConfg/tcpTLSselfSigned_client_config.json b/TemplateConfg/tcpTLSselfSigned_client_config.json deleted file mode 100644 index 737fa3b..0000000 --- a/TemplateConfg/tcpTLSselfSigned_client_config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "tcp", - "security": "tls", - "tlsSettings": { - "allowInsecure": true - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/tcpTLSselfSigned_server_config.json b/TemplateConfg/tcpTLSselfSigned_server_config.json deleted file mode 100644 index 252692b..0000000 --- a/TemplateConfg/tcpTLSselfSigned_server_config.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "security": "tls", - "tlsSettings": { - "certificates": [ - {} - ] - }, - "network": "tcp" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/tcp_TLS_server_config.json b/TemplateConfg/tcp_TLS_server_config.json deleted file mode 100644 index 209db44..0000000 --- a/TemplateConfg/tcp_TLS_server_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "security": "tls", - "tlsSettings": { - "certificates": [ - { - "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", - "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" - } - ] - }, - "network": "tcp" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/tcp_client_config.json b/TemplateConfg/tcp_client_config.json deleted file mode 100644 index dc040e2..0000000 --- a/TemplateConfg/tcp_client_config.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "tcp" - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/tcp_http_client_config.json b/TemplateConfg/tcp_http_client_config.json deleted file mode 100644 index 6c75bf3..0000000 --- a/TemplateConfg/tcp_http_client_config.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16 - } - ] - } - ] - }, - "streamSettings": { - "network": "tcp", - "tcpSettings": { - "header": { - "type": "http", - "request": { - "version": "1.1", - "method": "GET", - "path": [ - "/" - ], - "headers": { - "Host": [ - "www.cloudflare.com", - "www.amazon.com", - "www.microsoft.com", - "www.intel.com" - ], - "User-Agent": [ - "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36", - "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Connection": [ - "keep-alive" - ], - "Pragma": "no-cache" - } - } - } - } - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/tcp_http_server_config.json b/TemplateConfg/tcp_http_server_config.json deleted file mode 100644 index 678d423..0000000 --- a/TemplateConfg/tcp_http_server_config.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "tcp", - "tcpSettings": { - "header": { - "type": "http", - "response": { - "version": "1.1", - "status": "200", - "reason": "OK", - "headers": { - "Content-Type": [ - "application/octet-stream", - "application/x-msdownload", - "text/html", - "application/x-shockwave-flash" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Connection": [ - "keep-alive" - ], - "Pragma": "no-cache" - } - } - } - } - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/tcp_server_config.json b/TemplateConfg/tcp_server_config.json deleted file mode 100644 index d37266d..0000000 --- a/TemplateConfg/tcp_server_config.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/trojan_caddy_config.caddyfile b/TemplateConfg/trojan-go/trojan-go.caddyfile similarity index 100% rename from TemplateConfg/trojan_caddy_config.caddyfile rename to TemplateConfg/trojan-go/trojan-go.caddyfile diff --git a/TemplateConfg/trojan-go_all_config.json b/TemplateConfg/trojan-go/trojan-go_all_config.json similarity index 100% rename from TemplateConfg/trojan-go_all_config.json rename to TemplateConfg/trojan-go/trojan-go_all_config.json diff --git a/TemplateConfg/trojan/trojan.caddyfile b/TemplateConfg/trojan/trojan.caddyfile new file mode 100644 index 0000000..6001c60 --- /dev/null +++ b/TemplateConfg/trojan/trojan.caddyfile @@ -0,0 +1,8 @@ +:8800 { + root * /usr/share/caddy + file_server + ##sites## +} +##domain##:80 { + redir https://##domain##{uri} +} \ No newline at end of file diff --git a/TemplateConfg/trojan_client_config.json b/TemplateConfg/trojan/trojan_client_config.json similarity index 100% rename from TemplateConfg/trojan_client_config.json rename to TemplateConfg/trojan/trojan_client_config.json diff --git a/TemplateConfg/trojan_server_config.json b/TemplateConfg/trojan/trojan_server_config.json similarity index 100% rename from TemplateConfg/trojan_server_config.json rename to TemplateConfg/trojan/trojan_server_config.json diff --git a/TemplateConfg/v2ray/base.json b/TemplateConfg/v2ray/base.json new file mode 100644 index 0000000..84a9d1f --- /dev/null +++ b/TemplateConfg/v2ray/base.json @@ -0,0 +1,12 @@ +{ + "log": {}, + "api": {}, + "dns": {}, + "routing": {}, + "policy": {}, + "inbounds": [], + "outbounds": [], + "transport": {}, + "stats": {}, + "reverse": {} +} \ No newline at end of file diff --git a/TemplateConfg/Http2Web_server_config.caddyfile b/TemplateConfg/v2ray/caddy/Http2Web.caddyfile similarity index 100% rename from TemplateConfg/Http2Web_server_config.caddyfile rename to TemplateConfg/v2ray/caddy/Http2Web.caddyfile diff --git a/TemplateConfg/v2ray/caddy/WebSocketTLSWeb.caddyfile b/TemplateConfg/v2ray/caddy/WebSocketTLSWeb.caddyfile new file mode 100644 index 0000000..4bbeb1f --- /dev/null +++ b/TemplateConfg/v2ray/caddy/WebSocketTLSWeb.caddyfile @@ -0,0 +1,16 @@ +##domain## { + root * /usr/share/caddy + file_server + tls { + protocols tls1.2 tls1.3 + ciphers TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 + curves x25519 + } + @v2ray_websocket { + path ##path## + header Connection *Upgrade* + header Upgrade websocket + } + reverse_proxy @v2ray_websocket localhost:10000 + ##sites## +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/caddy/vlessTcpTlsWeb.caddyfile b/TemplateConfg/v2ray/caddy/vlessTcpTlsWeb.caddyfile new file mode 100644 index 0000000..6001c60 --- /dev/null +++ b/TemplateConfg/v2ray/caddy/vlessTcpTlsWeb.caddyfile @@ -0,0 +1,8 @@ +:8800 { + root * /usr/share/caddy + file_server + ##sites## +} +##domain##:80 { + redir https://##domain##{uri} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/00_log/00_log.json b/TemplateConfg/v2ray/client/00_log/00_log.json new file mode 100644 index 0000000..6a4cf00 --- /dev/null +++ b/TemplateConfg/v2ray/client/00_log/00_log.json @@ -0,0 +1,5 @@ +{ + "log": { + "loglevel": "warning" + } +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/01_api/01_api.json b/TemplateConfg/v2ray/client/01_api/01_api.json new file mode 100644 index 0000000..aa1982b --- /dev/null +++ b/TemplateConfg/v2ray/client/01_api/01_api.json @@ -0,0 +1,3 @@ +{ + "api": null +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/02_dns/02_dns.json b/TemplateConfg/v2ray/client/02_dns/02_dns.json new file mode 100644 index 0000000..63472d2 --- /dev/null +++ b/TemplateConfg/v2ray/client/02_dns/02_dns.json @@ -0,0 +1,3 @@ +{ + "dns": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/03_routing/03_routing.json b/TemplateConfg/v2ray/client/03_routing/03_routing.json new file mode 100644 index 0000000..a187d31 --- /dev/null +++ b/TemplateConfg/v2ray/client/03_routing/03_routing.json @@ -0,0 +1,3 @@ +{ + "routing": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/04_policy/04_policy.json b/TemplateConfg/v2ray/client/04_policy/04_policy.json new file mode 100644 index 0000000..4beed61 --- /dev/null +++ b/TemplateConfg/v2ray/client/04_policy/04_policy.json @@ -0,0 +1,3 @@ +{ + "policy": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/05_inbounds/05_inbounds.json b/TemplateConfg/v2ray/client/05_inbounds/05_inbounds.json new file mode 100644 index 0000000..dbce3dd --- /dev/null +++ b/TemplateConfg/v2ray/client/05_inbounds/05_inbounds.json @@ -0,0 +1,22 @@ +{ + "inbounds": [ + { + "protocol": "http", + "port": 1081 + }, + { + "port": 1080, + "protocol": "socks", + "sniffing": { + "enabled": true, + "destOverride": [ + "http", + "tls" + ] + }, + "settings": { + "auth": "noauth" + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/06_outbounds.json b/TemplateConfg/v2ray/client/06_outbounds/06_outbounds.json new file mode 100644 index 0000000..20e2beb --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/06_outbounds.json @@ -0,0 +1,3 @@ +{ + "outbounds": [] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/Http2Web_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/Http2Web_client_config.json new file mode 100644 index 0000000..39eb244 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/Http2Web_client_config.json @@ -0,0 +1,32 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "h2", + "security": "tls", + "httpSettings": { + "path": null, + "host": [ + "" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/Http2selfSigned_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/Http2selfSigned_client_config.json new file mode 100644 index 0000000..533b3ab --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/Http2selfSigned_client_config.json @@ -0,0 +1,32 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "h2", + "httpSettings": { + "path": null + }, + "security": "tls", + "tlsSettings": { + "allowInsecure": true + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/WebSocketTLSWeb_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/WebSocketTLSWeb_client_config.json new file mode 100644 index 0000000..b74f898 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/WebSocketTLSWeb_client_config.json @@ -0,0 +1,29 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "ws", + "security": "tls", + "wsSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/WebSocketTLS_selfSigned_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/WebSocketTLS_selfSigned_client_config.json new file mode 100644 index 0000000..b4f6377 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/WebSocketTLS_selfSigned_client_config.json @@ -0,0 +1,32 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "ws", + "wsSettings": { + "path": null + }, + "security": "tls", + "tlsSettings": { + "allowInsecure": true + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/WebSocket_TLS_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/WebSocket_TLS_client_config.json new file mode 100644 index 0000000..7118c8d --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/WebSocket_TLS_client_config.json @@ -0,0 +1,29 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "security": "tls", + "network": "ws", + "wsSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/http2_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/http2_client_config.json new file mode 100644 index 0000000..7ca16e1 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/http2_client_config.json @@ -0,0 +1,29 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 0, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "h2", + "security": "tls", + "httpSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/mkcp_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/mkcp_client_config.json new file mode 100644 index 0000000..32fb699 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/mkcp_client_config.json @@ -0,0 +1,34 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "kcp", + "kcpSettings": { + "uplinkCapacity": 100, + "downlinkCapacity": 100, + "congestion": true, + "header": { + "type": null + }, + "seed": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/quic_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/quic_client_config.json new file mode 100644 index 0000000..4a26943 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/quic_client_config.json @@ -0,0 +1,31 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16 + } + ] + } + ] + }, + "streamSettings": { + "network": "quic", + "quicSettings": { + "security": "chacha20-poly1305", + "key": null, + "header": { + "type": null + } + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/tcpTLSselfSigned_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/tcpTLSselfSigned_client_config.json new file mode 100644 index 0000000..69bfc54 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/tcpTLSselfSigned_client_config.json @@ -0,0 +1,29 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "tcp", + "security": "tls", + "tlsSettings": { + "allowInsecure": true + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/tcp_TLS_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/tcp_TLS_client_config.json similarity index 60% rename from TemplateConfg/tcp_TLS_client_config.json rename to TemplateConfg/v2ray/client/06_outbounds/tcp_TLS_client_config.json index 686a077..6e469e7 100644 --- a/TemplateConfg/tcp_TLS_client_config.json +++ b/TemplateConfg/v2ray/client/06_outbounds/tcp_TLS_client_config.json @@ -1,24 +1,4 @@ { - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], "outbounds": [ { "protocol": "vmess", diff --git a/TemplateConfg/v2ray/client/06_outbounds/tcp_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/tcp_client_config.json new file mode 100644 index 0000000..17166c9 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/tcp_client_config.json @@ -0,0 +1,25 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "tcp" + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/06_outbounds/tcp_http_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/tcp_http_client_config.json new file mode 100644 index 0000000..afd694c --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/tcp_http_client_config.json @@ -0,0 +1,55 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16 + } + ] + } + ] + }, + "streamSettings": { + "network": "tcp", + "tcpSettings": { + "header": { + "type": "http", + "request": { + "version": "1.1", + "method": "GET", + "path": [ + "/" + ], + "headers": { + "Host": [ + "www.cloudflare.com", + "www.amazon.com", + "www.microsoft.com", + "www.intel.com" + ], + "User-Agent": [ + "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/tcp_vless_tls_caddy_cilent_config.json b/TemplateConfg/v2ray/client/06_outbounds/tcp_vless_tls_caddy_cilent_config.json similarity index 66% rename from TemplateConfg/tcp_vless_tls_caddy_cilent_config.json rename to TemplateConfg/v2ray/client/06_outbounds/tcp_vless_tls_caddy_cilent_config.json index 4e1e18c..95475de 100644 --- a/TemplateConfg/tcp_vless_tls_caddy_cilent_config.json +++ b/TemplateConfg/v2ray/client/06_outbounds/tcp_vless_tls_caddy_cilent_config.json @@ -1,21 +1,4 @@ { - "log": { - "loglevel": "warning" - }, - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "listen": "127.0.0.1", - "protocol": "socks", - "settings": { - "udp": true - } - } - ], "outbounds": [ { "protocol": "vless", diff --git a/TemplateConfg/v2ray/client/06_outbounds/webSocket_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/webSocket_client_config.json new file mode 100644 index 0000000..c746fe1 --- /dev/null +++ b/TemplateConfg/v2ray/client/06_outbounds/webSocket_client_config.json @@ -0,0 +1,25 @@ +{ + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": null, + "port": null, + "users": [ + { + "id": null, + "alterId": 16, + "security": "auto" + } + ] + } + ] + }, + "streamSettings": { + "network": "ws" + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/07_transport/07_transport.json b/TemplateConfg/v2ray/client/07_transport/07_transport.json new file mode 100644 index 0000000..6269103 --- /dev/null +++ b/TemplateConfg/v2ray/client/07_transport/07_transport.json @@ -0,0 +1,3 @@ +{ + "transport": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/08_stats/08_stats.json b/TemplateConfg/v2ray/client/08_stats/08_stats.json new file mode 100644 index 0000000..a58051b --- /dev/null +++ b/TemplateConfg/v2ray/client/08_stats/08_stats.json @@ -0,0 +1,3 @@ +{ + "stats": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/client/09_reverse/09_reverse.json b/TemplateConfg/v2ray/client/09_reverse/09_reverse.json new file mode 100644 index 0000000..6fa38a4 --- /dev/null +++ b/TemplateConfg/v2ray/client/09_reverse/09_reverse.json @@ -0,0 +1,3 @@ +{ + "reverse": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/00_log/00_log.json b/TemplateConfg/v2ray/server/00_log/00_log.json new file mode 100644 index 0000000..6a4cf00 --- /dev/null +++ b/TemplateConfg/v2ray/server/00_log/00_log.json @@ -0,0 +1,5 @@ +{ + "log": { + "loglevel": "warning" + } +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/01_api/01_api.json b/TemplateConfg/v2ray/server/01_api/01_api.json new file mode 100644 index 0000000..aa1982b --- /dev/null +++ b/TemplateConfg/v2ray/server/01_api/01_api.json @@ -0,0 +1,3 @@ +{ + "api": null +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/02_dns/02_dns.json b/TemplateConfg/v2ray/server/02_dns/02_dns.json new file mode 100644 index 0000000..63472d2 --- /dev/null +++ b/TemplateConfg/v2ray/server/02_dns/02_dns.json @@ -0,0 +1,3 @@ +{ + "dns": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/03_routing/03_routing.json b/TemplateConfg/v2ray/server/03_routing/03_routing.json new file mode 100644 index 0000000..0aa4964 --- /dev/null +++ b/TemplateConfg/v2ray/server/03_routing/03_routing.json @@ -0,0 +1,14 @@ +{ + "routing": { + "domainStrategy": "AsIs", + "rules": [ + { + "type": "field", + "ip": [ + "geoip:private" + ], + "outboundTag": "block" + } + ] + } +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/04_policy/04_policy.json b/TemplateConfg/v2ray/server/04_policy/04_policy.json new file mode 100644 index 0000000..4beed61 --- /dev/null +++ b/TemplateConfg/v2ray/server/04_policy/04_policy.json @@ -0,0 +1,3 @@ +{ + "policy": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/00_padavan_router.json b/TemplateConfg/v2ray/server/05_inbounds/00_padavan_router.json new file mode 100644 index 0000000..2b9d236 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/00_padavan_router.json @@ -0,0 +1,9 @@ +{ + "sniffing": { + "enabled": true, + "destOverride": [ + "http", + "tls" + ] + } +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/05_inbounds.json b/TemplateConfg/v2ray/server/05_inbounds/05_inbounds.json new file mode 100644 index 0000000..9a8d634 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/05_inbounds.json @@ -0,0 +1,3 @@ +{ + "inbounds": [] +} diff --git a/TemplateConfg/v2ray/server/05_inbounds/Http2Web_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/Http2Web_server_config.json new file mode 100644 index 0000000..077c799 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/Http2Web_server_config.json @@ -0,0 +1,27 @@ +{ + "inbounds": [ + { + "port": 10000, + "listen": "127.0.0.1", + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "network": "h2", + "security": "none", + "httpSettings": { + "path": null, + "host": [ + "" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/Http2selfSigned_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/Http2selfSigned_server_config.json new file mode 100644 index 0000000..5f49a0f --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/Http2selfSigned_server_config.json @@ -0,0 +1,28 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "network": "h2", + "security": "tls", + "tlsSettings": { + "certificates": [ + {} + ] + }, + "httpSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/WebSocketTLSWeb_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/WebSocketTLSWeb_server_config.json new file mode 100644 index 0000000..7c5f1a5 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/WebSocketTLSWeb_server_config.json @@ -0,0 +1,23 @@ +{ + "inbounds": [ + { + "port": 10000, + "listen": "127.0.0.1", + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "network": "ws", + "wsSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/WebSocketTLS_selfSigned_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/WebSocketTLS_selfSigned_server_config.json new file mode 100644 index 0000000..cd4afba --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/WebSocketTLS_selfSigned_server_config.json @@ -0,0 +1,28 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "security": "tls", + "tlsSettings": { + "certificates": [ + {} + ] + }, + "network": "ws", + "wsSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/WebSocket_TLS_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/WebSocket_TLS_server_config.json new file mode 100644 index 0000000..f1e69f5 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/WebSocket_TLS_server_config.json @@ -0,0 +1,31 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "security": "tls", + "tlsSettings": { + "certificates": [ + { + "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", + "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" + } + ] + }, + "network": "ws", + "wsSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/http2_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/http2_server_config.json new file mode 100644 index 0000000..a3b4221 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/http2_server_config.json @@ -0,0 +1,31 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 0 + } + ] + }, + "streamSettings": { + "network": "h2", + "security": "tls", + "tlsSettings": { + "certificates": [ + { + "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", + "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" + } + ] + }, + "httpSettings": { + "path": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/mkcp_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/mkcp_server_config.json new file mode 100644 index 0000000..bf8a13c --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/mkcp_server_config.json @@ -0,0 +1,28 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "network": "mkcp", + "kcpSettings": { + "uplinkCapacity": 100, + "downlinkCapacity": 100, + "congestion": true, + "header": { + "type": null + }, + "seed": null + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/quic_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/quic_server_config.json new file mode 100644 index 0000000..9e28939 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/quic_server_config.json @@ -0,0 +1,26 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "network": "quic", + "quicSettings": { + "security": "chacha20-poly1305", + "key": null, + "header": { + "type": null + } + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/tcpTLSselfSigned_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/tcpTLSselfSigned_server_config.json new file mode 100644 index 0000000..61e7ac8 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/tcpTLSselfSigned_server_config.json @@ -0,0 +1,25 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "security": "tls", + "tlsSettings": { + "certificates": [ + {} + ] + }, + "network": "tcp" + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/tcp_TLS_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/tcp_TLS_server_config.json new file mode 100644 index 0000000..9686194 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/tcp_TLS_server_config.json @@ -0,0 +1,28 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "security": "tls", + "tlsSettings": { + "certificates": [ + { + "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", + "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" + } + ] + }, + "network": "tcp" + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/tcp_http_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/tcp_http_server_config.json new file mode 100644 index 0000000..11b896f --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/tcp_http_server_config.json @@ -0,0 +1,44 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "network": "tcp", + "tcpSettings": { + "header": { + "type": "http", + "response": { + "version": "1.1", + "status": "200", + "reason": "OK", + "headers": { + "Content-Type": [ + "application/octet-stream", + "application/x-msdownload", + "text/html", + "application/x-shockwave-flash" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Connection": [ + "keep-alive" + ], + "Pragma": "no-cache" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/tcp_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/tcp_server_config.json new file mode 100644 index 0000000..25f5e52 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/tcp_server_config.json @@ -0,0 +1,16 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/tcp_vless_tls_caddy_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/tcp_vless_tls_caddy_server_config.json similarity index 88% rename from TemplateConfg/tcp_vless_tls_caddy_server_config.json rename to TemplateConfg/v2ray/server/05_inbounds/tcp_vless_tls_caddy_server_config.json index 60501a1..3dc0236 100644 --- a/TemplateConfg/tcp_vless_tls_caddy_server_config.json +++ b/TemplateConfg/v2ray/server/05_inbounds/tcp_vless_tls_caddy_server_config.json @@ -1,7 +1,4 @@ { - "log": { - "loglevel": "warning" - }, "inbounds": [ { "port": 443, @@ -35,10 +32,5 @@ } } } - ], - "outbounds": [ - { - "protocol": "freedom" - } ] } \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/05_inbounds/webSocket_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/webSocket_server_config.json new file mode 100644 index 0000000..42ffda2 --- /dev/null +++ b/TemplateConfg/v2ray/server/05_inbounds/webSocket_server_config.json @@ -0,0 +1,19 @@ +{ + "inbounds": [ + { + "port": null, + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": null, + "alterId": 64 + } + ] + }, + "streamSettings": { + "network": "ws" + } + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/06_outbounds/06_outbounds.json b/TemplateConfg/v2ray/server/06_outbounds/06_outbounds.json new file mode 100644 index 0000000..467a4e1 --- /dev/null +++ b/TemplateConfg/v2ray/server/06_outbounds/06_outbounds.json @@ -0,0 +1,12 @@ +{ + "outbounds": [ + { + "protocol": "freedom", + "tag": "direct" + }, + { + "protocol": "blackhole", + "tag": "block" + } + ] +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/07_transport/07_transport.json b/TemplateConfg/v2ray/server/07_transport/07_transport.json new file mode 100644 index 0000000..6269103 --- /dev/null +++ b/TemplateConfg/v2ray/server/07_transport/07_transport.json @@ -0,0 +1,3 @@ +{ + "transport": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/08_stats/08_stats.json b/TemplateConfg/v2ray/server/08_stats/08_stats.json new file mode 100644 index 0000000..a58051b --- /dev/null +++ b/TemplateConfg/v2ray/server/08_stats/08_stats.json @@ -0,0 +1,3 @@ +{ + "stats": {} +} \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/09_reverse/09_reverse.json b/TemplateConfg/v2ray/server/09_reverse/09_reverse.json new file mode 100644 index 0000000..6fa38a4 --- /dev/null +++ b/TemplateConfg/v2ray/server/09_reverse/09_reverse.json @@ -0,0 +1,3 @@ +{ + "reverse": {} +} \ No newline at end of file diff --git a/TemplateConfg/webSocket_client_config.json b/TemplateConfg/webSocket_client_config.json deleted file mode 100644 index f12516b..0000000 --- a/TemplateConfg/webSocket_client_config.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "inbounds": [ - { - "protocol": "http", - "port": 1081 - }, - { - "port": 1080, - "protocol": "socks", - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - }, - "settings": { - "auth": "noauth" - } - } - ], - "outbounds": [ - { - "protocol": "vmess", - "settings": { - "vnext": [ - { - "address": null, - "port": null, - "users": [ - { - "id": null, - "alterId": 16, - "security": "auto" - } - ] - } - ] - }, - "streamSettings": { - "network": "ws" - } - } - ] -} \ No newline at end of file diff --git a/TemplateConfg/webSocket_server_config.json b/TemplateConfg/webSocket_server_config.json deleted file mode 100644 index f80c616..0000000 --- a/TemplateConfg/webSocket_server_config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "inbounds": [ - { - "port": null, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": null, - "alterId": 64 - } - ] - }, - "streamSettings": { - "network": "ws" - } - } - ], - "outbounds": [ - { - "protocol": "freedom", - "settings": {} - } - ] -} \ No newline at end of file