1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2025-03-26 18:14:02 +03:00

添加NaiveProxy一键安装04

This commit is contained in:
ProxySU 2020-04-29 13:56:56 +08:00
parent 4217d11c43
commit 6e19150faf
2 changed files with 10 additions and 4 deletions

View File

@ -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)
{

View File

@ -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("其他平台的客户端,暂未发布");