diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index b916149..7c2bcfd 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -2195,7 +2195,7 @@ namespace ProxySU Thread.Sleep(1000); client.RunCommand("curl https://getcaddy.com -o getcaddy"); - client.RunCommand("bash getcaddy personal hook.service http.forwardproxy"); + client.RunCommand("bash getcaddy personal hook.service,http.forwardproxy"); client.RunCommand("mkdir -p /etc/caddy"); client.RunCommand("mkdir -p /var/www"); @@ -2209,14 +2209,19 @@ namespace ProxySU UploadConfig(connectionInfo, caddyConfig, upLoadPath); //设置Caddyfile文件中的tls 邮箱 - string email = $"user@{ReceiveConfigurationParameters[4]}"; + //设置域名 string sshCmd = $"sed -i 's/##domain##/{ReceiveConfigurationParameters[4]}/' {upLoadPath}"; + client.RunCommand(sshCmd); //MessageBox.Show(sshCmd); + + //设置TLS邮箱 + sshCmd = $"sed -i 's/off/{email}/' {upLoadPath}"; client.RunCommand(sshCmd); //设置用户名密码 sshCmd = $"sed -i 's/##basicauth##/basicauth {ReceiveConfigurationParameters[3]} {ReceiveConfigurationParameters[2]}/' {upLoadPath}"; + client.RunCommand(sshCmd); //设置伪装网站 if (String.IsNullOrEmpty(ReceiveConfigurationParameters[7]) == false) { diff --git a/ProxySU/NaiveProxyResultInfoWindow.xaml.cs b/ProxySU/NaiveProxyResultInfoWindow.xaml.cs index 733d905..4c7e9d1 100644 --- a/ProxySU/NaiveProxyResultInfoWindow.xaml.cs +++ b/ProxySU/NaiveProxyResultInfoWindow.xaml.cs @@ -31,6 +31,7 @@ namespace ProxySU TextBoxNaiveServerHost.Text = MainWindow.ReceiveConfigurationParameters[4]; TextBoxNaiveUser.Text = MainWindow.ReceiveConfigurationParameters[3]; TextBoxNaivePassword.Text= MainWindow.ReceiveConfigurationParameters[2]; + GenerateV2rayShareQRcodeAndBase64Url(); } private void GenerateV2rayShareQRcodeAndBase64Url() @@ -57,7 +58,7 @@ namespace ProxySU //} //CreateQRCode(trojanUrl); - //移动Trojan官方程序配置文件到相应目录 + //移动NaiveProxy官方程序配置文件到相应目录 if (File.Exists(@"naive_config\config.json")) { File.Move(@"naive_config\config.json", @"naive_config\" + saveFileFolder + @"\config.json"); @@ -69,7 +70,7 @@ namespace ProxySU sw.WriteLine("config.json"); sw.WriteLine("此文件为NaiveProxy官方程序所使用的客户端配置文件,配置为全局模式,socks5地址:127.0.0.1:1080"); sw.WriteLine("NaiveProxy官方网站:https://github.com/klzgrad/naiveproxy"); - sw.WriteLine("Trojan官方程序下载地址:https://github.com/klzgrad/naiveproxy/releases"); + sw.WriteLine("NaiveProxy官方程序下载地址:https://github.com/klzgrad/naiveproxy/releases"); sw.WriteLine("下载相应版本,Windows选择naiveproxy-x.xx-win.zip,解压后提取naive.exe。与config.json放在同一目录,运行naive.exe即可。"); sw.WriteLine("-----------------------------------------\n"); sw.WriteLine("其他平台的客户端,暂未发布");