1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-21 20:56:08 +03:00
This commit is contained in:
autumn 2021-06-18 20:53:46 +08:00
parent 95dccb1c6c
commit 63c7f8b7a7
8 changed files with 52 additions and 8 deletions

View File

@ -93,7 +93,7 @@ namespace ProxySuper.Core.Services
{
var errorLog = "安装终止," + ex.Message;
WriteOutput(errorLog);
MessageBox.Show(errorLog);
MessageBox.Show("安装失败,请联系开发者或上传日志文件(Logs文件夹下)到github提问。");
}
}

View File

@ -662,7 +662,7 @@ namespace ProxySuper.Core.Services
// 安装Acme
var result = RunCmd($"curl https://get.acme.sh yes | sh -s email={Parameters.Email}");
var result = RunCmd($"curl https://get.acme.sh yes | sh");
if (result.Contains("Install success"))
{
WriteOutput("安装 acme.sh 成功");
@ -679,12 +679,12 @@ namespace ProxySuper.Core.Services
// 申请证书
if (OnlyIpv6)
{
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --listen-v6 --pre-hook \"systemctl stop caddy\" --post-hook \"systemctl start caddy\"";
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --listen-v6 --pre-hook \"systemctl stop caddy\" --post-hook \"systemctl start caddy\" --server letsencrypt";
result = RunCmd(cmd);
}
else
{
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --pre-hook \"systemctl stop caddy\" --post-hook \"systemctl start caddy\"";
var cmd = $"/root/.acme.sh/acme.sh --force --debug --issue --standalone -d {Parameters.Domain} --pre-hook \"systemctl stop caddy\" --post-hook \"systemctl start caddy\" --server letsencrypt";
result = RunCmd(cmd);
}

View File

@ -129,7 +129,7 @@ namespace ProxySuper.Core.Services
{
var errorLog = "安装终止," + ex.Message;
WriteOutput(errorLog);
MessageBox.Show(errorLog);
MessageBox.Show("安装失败,请联系开发者或上传日志文件(Logs文件夹下)到github提问。");
}
}

View File

@ -98,7 +98,7 @@ namespace ProxySuper.Core.Services
{
var errorLog = "安装终止," + ex.Message;
WriteOutput(errorLog);
MessageBox.Show(errorLog);
MessageBox.Show("安装失败,请联系开发者或上传日志文件(Logs文件夹下)到github提问。");
}
}

View File

@ -51,5 +51,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.2.0")]
[assembly: AssemblyFileVersion("4.0.2.0")]
[assembly: AssemblyVersion("4.0.3.0")]
[assembly: AssemblyFileVersion("4.0.3.0")]

View File

@ -8,6 +8,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -71,6 +72,7 @@ namespace ProxySuper.WPF.Views
{
outShell += "\n";
}
ViewModel.CommandText += outShell;
Dispatcher.Invoke(() =>
{
@ -119,8 +121,19 @@ namespace ProxySuper.WPF.Views
{
Task.Factory.StartNew(OpenConnect);
};
base.Closed += SaveInstallLog;
}
private void SaveInstallLog(object sender, EventArgs e)
{
if (!Directory.Exists("Logs"))
{
Directory.CreateDirectory("Logs");
}
var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".naiveproxy.txt");
File.WriteAllText(fileName, ViewModel.CommandText);
}
private void OpenLink(object sender, RoutedEventArgs e)
{

View File

@ -9,6 +9,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -73,6 +74,7 @@ namespace ProxySuper.WPF.Views
{
outShell += "\n";
}
ViewModel.CommandText += outShell;
Dispatcher.Invoke(() =>
{
@ -121,8 +123,19 @@ namespace ProxySuper.WPF.Views
{
Task.Factory.StartNew(OpenConnect);
};
base.Closed += SaveInstallLog;
}
private void SaveInstallLog(object sender, EventArgs e)
{
if (!Directory.Exists("Logs"))
{
Directory.CreateDirectory("Logs");
}
var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".trojan-go.txt");
File.WriteAllText(fileName, ViewModel.CommandText);
}
private void OpenLink(object sender, RoutedEventArgs e)
{

View File

@ -8,6 +8,7 @@ using Renci.SshNet;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Automation.Peers;
@ -45,6 +46,19 @@ namespace ProxySuper.WPF.Views
{
Task.Factory.StartNew(OpenConnect);
};
base.Closed += SaveInstallLog;
}
private void SaveInstallLog(object sender, EventArgs e)
{
if (!Directory.Exists("Logs"))
{
Directory.CreateDirectory("Logs");
}
var fileName = Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".xary.txt");
File.WriteAllText(fileName, ViewModel.CommandText);
}
private SshClient _sshClient;
@ -75,6 +89,7 @@ namespace ProxySuper.WPF.Views
{
outShell += "\n";
}
ViewModel.CommandText += outShell;
Dispatcher.Invoke(() =>
{
@ -116,6 +131,8 @@ namespace ProxySuper.WPF.Views
}
#region
private void OpenLink(object sender, RoutedEventArgs e)
{
Hyperlink link = sender as Hyperlink;
@ -186,6 +203,7 @@ namespace ProxySuper.WPF.Views
}
});
}
#endregion
}
}