├── .editorconfig ├── .github └── workflows │ └── dotnet.yml ├── .gitignore ├── .idea └── .idea.ProxySU │ ├── .idea │ ├── codeStyles │ │ └── codeStyleConfig.xml │ ├── contentModel.xml │ ├── encodings.xml │ ├── indexLayout.xml │ ├── modules.xml │ ├── projectSettingsUpdater.xml │ ├── vcs.xml │ └── workspace.xml │ └── riderModule.iml ├── LICENSE ├── ProxySU.sln ├── ProxySU.sln.DotSettings ├── ProxySuper.Core ├── App.cs ├── Converters │ ├── LoginSecretTypeConverter.cs │ ├── ProxyTypeConverter.cs │ └── VisibleConverter.cs ├── Extension │ └── XrayExtension.cs ├── Helpers │ ├── DateTimeUtils.cs │ ├── HttpClientUtil.cs │ └── Utils.cs ├── Models │ ├── Caddy.cs │ ├── External │ │ └── XrayVersionResponse.cs │ ├── Hosts │ │ ├── Host.cs │ │ ├── LocalProxy.cs │ │ └── LoginSecretType.cs │ ├── ProjectProgress.cs │ ├── Projects │ │ ├── BrookSettings.cs │ │ ├── BrookType.cs │ │ ├── HysteriaSettings.cs │ │ ├── IProjectSettings.cs │ │ ├── MTProtoGoSettings.cs │ │ ├── NaiveProxySettings.cs │ │ ├── ProjectType.cs │ │ ├── RayType.cs │ │ ├── TrojanGoSettings.cs │ │ ├── V2raySettings.cs │ │ ├── V2raySettings_SS.cs │ │ ├── V2raySettings_Trojan.cs │ │ ├── V2raySettings_VLESS.cs │ │ ├── V2raySettings_VMESS.cs │ │ └── XraySettings.cs │ └── Record.cs ├── Properties │ └── AssemblyInfo.cs ├── ProxySuper.Core.csproj ├── Services │ ├── BrookService.cs │ ├── MTProtoGoService.cs │ ├── NaiveProxyService.cs │ ├── ServiceBase.cs │ ├── ShareLink.cs │ ├── TrojanGoConfigBuilder.cs │ ├── TrojanGoService.cs │ ├── V2rayConfigBuilder.cs │ ├── V2rayService.cs │ ├── XrayConfigBuilder.cs │ └── XrayService.cs ├── ViewModels │ ├── BrookConfigViewModel.cs │ ├── BrookEditorViewModel.cs │ ├── BrookInstallViewModel.cs │ ├── EnableRootViewModel.cs │ ├── HomeViewModel.cs │ ├── HysteriaEditorViewModel.cs │ ├── HysteriaInstallViewModel.cs │ ├── MTProtoGoConfigViewModel.cs │ ├── MTProtoGoEditorViewModel.cs │ ├── MTProtoGoInstallViewModel.cs │ ├── NaiveProxyConfigViewModel.cs │ ├── NaiveProxyEditorViewModel.cs │ ├── NaiveProxyInstallViewModel.cs │ ├── ShareLinkViewModel.cs │ ├── TrojanGoConfigViewModel.cs │ ├── TrojanGoEditorViewModel.cs │ ├── TrojanGoInstallViewModel.cs │ ├── V2rayConfigViewModel.cs │ ├── V2rayEditorViewModel.cs │ ├── V2rayInstallViewModel.cs │ ├── XrayConfigViewModel.cs │ ├── XrayEditorViewModel.cs │ └── XrayInstallViewModel.cs ├── app.config └── packages.config ├── ProxySuper.WPF ├── App.config ├── App.xaml ├── App.xaml.cs ├── Controls │ ├── HostControl.xaml │ ├── HostControl.xaml.cs │ ├── ProgressControl.xaml │ ├── ProgressControl.xaml.cs │ ├── ShadowSocksControl.xaml │ ├── ShadowSocksControl.xaml.cs │ ├── Trojan_TCP_Control.xaml │ ├── Trojan_TCP_Control.xaml.cs │ ├── V2raySettingsControl.xaml │ ├── V2raySettingsControl.xaml.cs │ ├── VLESS_KCP_Control.xaml │ ├── VLESS_KCP_Control.xaml.cs │ ├── VLESS_QUIC_Control.xaml │ ├── VLESS_QUIC_Control.xaml.cs │ ├── VLESS_TCP_TLS_Control.xaml │ ├── VLESS_TCP_TLS_Control.xaml.cs │ ├── VLESS_WS_TLS_Control.xaml │ ├── VLESS_WS_TLS_Control.xaml.cs │ ├── VLESS_XTLS_Control.xaml │ ├── VLESS_XTLS_Control.xaml.cs │ ├── VLESS_gRPC_Control.xaml │ ├── VLESS_gRPC_Control.xaml.cs │ ├── VMESS_KCP_Control.xaml │ ├── VMESS_KCP_Control.xaml.cs │ ├── VMESS_QUIC_Control.xaml │ ├── VMESS_QUIC_Control.xaml.cs │ ├── VMESS_TCP_TLS_Control.xaml │ ├── VMESS_TCP_TLS_Control.xaml.cs │ ├── VMESS_WS_TLS_Control.xaml │ ├── VMESS_WS_TLS_Control.xaml.cs │ ├── XraySettingsControl.xaml │ └── XraySettingsControl.xaml.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── ProxySU.ico ├── ProxySuper.WPF.csproj ├── Resources │ ├── Languages │ │ ├── en.xaml │ │ ├── tw_cn.xaml │ │ └── zh_cn.xaml │ ├── ProxySU.ico │ └── Styles │ │ └── DataGridStyle.xaml ├── Setup.cs ├── Templates │ ├── NaiveProxy │ │ ├── caddy.service │ │ └── naive_server.caddyfile │ ├── trojan-go │ │ ├── base.caddyfile │ │ └── trojan-go.json │ ├── v2ray │ │ ├── base.json │ │ ├── caddy │ │ │ └── base.caddyfile │ │ ├── client │ │ │ ├── 00_log │ │ │ │ └── 00_log.json │ │ │ ├── 01_api │ │ │ │ └── 01_api.json │ │ │ ├── 02_dns │ │ │ │ └── 02_dns.json │ │ │ ├── 03_routing │ │ │ │ └── 03_routing.json │ │ │ ├── 04_policy │ │ │ │ └── 04_policy.json │ │ │ ├── 05_inbounds │ │ │ │ └── 05_inbounds.json │ │ │ ├── 06_outbounds │ │ │ │ ├── 06_outbounds.json │ │ │ │ ├── VLESS_HTTP2_TLS.json │ │ │ │ └── VLESS_TCP_TLS_WS.json │ │ │ ├── 07_transport │ │ │ │ └── 07_transport.json │ │ │ ├── 08_stats │ │ │ │ └── 08_stats.json │ │ │ └── 09_reverse │ │ │ │ └── 09_reverse.json │ │ └── server │ │ │ ├── 00_log │ │ │ └── 00_log.json │ │ │ ├── 01_api │ │ │ └── 01_api.json │ │ │ ├── 02_dns │ │ │ └── 02_dns.json │ │ │ ├── 03_routing │ │ │ └── 03_routing.json │ │ │ ├── 04_policy │ │ │ └── 04_policy.json │ │ │ ├── 05_inbounds │ │ │ ├── 05_inbounds.json │ │ │ ├── Shadowsocks-AEAD.json │ │ │ ├── Trojan_TCP.json │ │ │ ├── Trojan_WS.json │ │ │ ├── VLESS_HTTP2.json │ │ │ ├── VLESS_KCP.json │ │ │ ├── VLESS_QUIC.json │ │ │ ├── VLESS_TCP_TLS.json │ │ │ ├── VLESS_WS.json │ │ │ ├── VLESS_gRPC.json │ │ │ ├── VMESS_HTTP2.json │ │ │ ├── VMESS_KCP.json │ │ │ ├── VMESS_QUIC.json │ │ │ ├── VMESS_TCP.json │ │ │ └── VMESS_WS.json │ │ │ ├── 06_outbounds │ │ │ └── 06_outbounds.json │ │ │ ├── 07_transport │ │ │ └── 07_transport.json │ │ │ ├── 08_stats │ │ │ └── 08_stats.json │ │ │ └── 09_reverse │ │ │ └── 09_reverse.json │ └── xray │ │ ├── base.json │ │ ├── caddy │ │ └── base.caddyfile │ │ ├── client │ │ ├── 00_log │ │ │ └── 00_log.json │ │ ├── 01_api │ │ │ └── 01_api.json │ │ ├── 02_dns │ │ │ └── 02_dns.json │ │ ├── 03_routing │ │ │ └── 03_routing.json │ │ ├── 04_policy │ │ │ └── 04_policy.json │ │ ├── 05_inbounds │ │ │ └── 05_inbounds.json │ │ ├── 06_outbounds │ │ │ ├── 06_outbounds.json │ │ │ ├── VLESS_HTTP2_TLS.json │ │ │ └── VLESS_TCP_TLS_WS.json │ │ ├── 07_transport │ │ │ └── 07_transport.json │ │ ├── 08_stats │ │ │ └── 08_stats.json │ │ └── 09_reverse │ │ │ └── 09_reverse.json │ │ └── server │ │ ├── 00_log │ │ └── 00_log.json │ │ ├── 01_api │ │ └── 01_api.json │ │ ├── 02_dns │ │ └── 02_dns.json │ │ ├── 03_routing │ │ └── 03_routing.json │ │ ├── 04_policy │ │ └── 04_policy.json │ │ ├── 05_inbounds │ │ ├── 05_inbounds.json │ │ ├── Shadowsocks-AEAD.json │ │ ├── Trojan_TCP.json │ │ ├── Trojan_WS.json │ │ ├── VLESS_HTTP2.json │ │ ├── VLESS_KCP.json │ │ ├── VLESS_QUIC.json │ │ ├── VLESS_TCP_XTLS.json │ │ ├── VLESS_TCP_XTLS_Vision.json │ │ ├── VLESS_WS.json │ │ ├── VLESS_gRPC.json │ │ ├── VMESS_HTTP2.json │ │ ├── VMESS_KCP.json │ │ ├── VMESS_QUIC.json │ │ ├── VMESS_TCP.json │ │ └── VMESS_WS.json │ │ ├── 06_outbounds │ │ └── 06_outbounds.json │ │ ├── 07_transport │ │ └── 07_transport.json │ │ ├── 08_stats │ │ └── 08_stats.json │ │ └── 09_reverse │ │ └── 09_reverse.json ├── Views │ ├── Brook │ │ ├── BrookConfigView.xaml │ │ ├── BrookConfigView.xaml.cs │ │ ├── BrookEditorView.xaml │ │ ├── BrookEditorView.xaml.cs │ │ ├── BrookInstallView.xaml │ │ └── BrookInstallView.xaml.cs │ ├── EnableRootView.xaml │ ├── EnableRootView.xaml.cs │ ├── HomeView.xaml │ ├── HomeView.xaml.cs │ ├── Hysteria │ │ ├── HysteriaEditorView.xaml │ │ └── HysteriaEditorView.xaml.cs │ ├── MTProxyGo │ │ ├── MTProxyGoConfigView.xaml │ │ ├── MTProxyGoConfigView.xaml.cs │ │ ├── MTProxyGoEditorView.xaml │ │ ├── MTProxyGoEditorView.xaml.cs │ │ ├── MTProxyGoInstallView.xaml │ │ └── MTProxyGoInstallView.xaml.cs │ ├── NaiveProxy │ │ ├── NaiveProxyConfigView.xaml │ │ ├── NaiveProxyConfigView.xaml.cs │ │ ├── NaiveProxyEditorView.xaml │ │ ├── NaiveProxyEditorView.xaml.cs │ │ ├── NaiveProxyInstallView.xaml │ │ └── NaiveProxyInstallView.xaml.cs │ ├── ShareLinkView.xaml │ ├── ShareLinkView.xaml.cs │ ├── TrojanGo │ │ ├── TrojanGoConfigView.xaml │ │ ├── TrojanGoConfigView.xaml.cs │ │ ├── TrojanGoEditorView.xaml │ │ ├── TrojanGoEditorView.xaml.cs │ │ ├── TrojanGoInstallView.xaml │ │ └── TrojanGoInstallView.xaml.cs │ ├── V2ray │ │ ├── V2rayConfigView.xaml │ │ ├── V2rayConfigView.xaml.cs │ │ ├── V2rayEditorView.xaml │ │ ├── V2rayEditorView.xaml.cs │ │ ├── V2rayInstallView.xaml │ │ └── V2rayInstallView.xaml.cs │ └── Xray │ │ ├── XrayConfigView.xaml │ │ ├── XrayConfigView.xaml.cs │ │ ├── XrayEditorView.xaml │ │ ├── XrayEditorView.xaml.cs │ │ ├── XrayInstallView.xaml │ │ └── XrayInstallView.xaml.cs └── packages.config └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # Default severity for all analyzer diagnostics 4 | dotnet_analyzer_diagnostic.severity = none 5 | -------------------------------------------------------------------------------- /.github/workflows/dotnet.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a .NET project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net 3 | 4 | name: .NET 5 | 6 | on: 7 | push: 8 | branches: [ "master" ] 9 | pull_request: 10 | branches: [ "master" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Setup .NET 20 | uses: actions/setup-dotnet@v3 21 | with: 22 | dotnet-version: 6.0.x 23 | - name: Restore dependencies 24 | run: dotnet restore 25 | - name: Build 26 | run: dotnet build --no-restore 27 | - name: Test 28 | run: dotnet test --no-build --verbosity normal 29 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/.idea/contentModel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/.idea/projectSettingsUpdater.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/.idea.ProxySU/riderModule.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ProxySU.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31606.5 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{CE908112-DB46-4B91-8236-9139A19D66E9}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProxySuper.WPF", "ProxySuper.WPF\ProxySuper.WPF.csproj", "{B083EBFD-2925-46C9-8B00-E2C1300CEBA1}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProxySuper.Core", "ProxySuper.Core\ProxySuper.Core.csproj", "{15779EE6-D8CA-44BF-BFE2-941E155EEF3F}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {B083EBFD-2925-46C9-8B00-E2C1300CEBA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {B083EBFD-2925-46C9-8B00-E2C1300CEBA1}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {B083EBFD-2925-46C9-8B00-E2C1300CEBA1}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {B083EBFD-2925-46C9-8B00-E2C1300CEBA1}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {15779EE6-D8CA-44BF-BFE2-941E155EEF3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {15779EE6-D8CA-44BF-BFE2-941E155EEF3F}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {15779EE6-D8CA-44BF-BFE2-941E155EEF3F}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {15779EE6-D8CA-44BF-BFE2-941E155EEF3F}.Release|Any CPU.Build.0 = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(SolutionProperties) = preSolution 28 | HideSolutionNode = FALSE 29 | EndGlobalSection 30 | GlobalSection(NestedProjects) = preSolution 31 | {B083EBFD-2925-46C9-8B00-E2C1300CEBA1} = {CE908112-DB46-4B91-8236-9139A19D66E9} 32 | {15779EE6-D8CA-44BF-BFE2-941E155EEF3F} = {CE908112-DB46-4B91-8236-9139A19D66E9} 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {A3F3B8D6-7FED-42D9-9994-E913BD32E025} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /ProxySU.sln.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True -------------------------------------------------------------------------------- /ProxySuper.Core/App.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.ViewModels; 3 | 4 | namespace ProxySuper.Core 5 | { 6 | public class App : MvxApplication 7 | { 8 | public override void Initialize() 9 | { 10 | RegisterAppStart(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ProxySuper.Core/Converters/LoginSecretTypeConverter.cs: -------------------------------------------------------------------------------- 1 | using ProxySuper.Core.Models.Hosts; 2 | using System; 3 | using System.Globalization; 4 | using System.Windows.Data; 5 | 6 | namespace ProxySuper.Core.Converters 7 | { 8 | public class LoginSecretTypeConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return value.Equals(parameter); 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | if (parameter == null) return LoginSecretType.Password; 18 | return parameter; 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ProxySuper.Core/Converters/ProxyTypeConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace ProxySuper.Core.Converters 6 | { 7 | public class ProxyTypeConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | return value != null && value.Equals(parameter); 12 | } 13 | 14 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 15 | { 16 | if (value == null) 17 | { 18 | return Binding.DoNothing; 19 | } 20 | 21 | if (!value.Equals(true)) 22 | { 23 | return Binding.DoNothing; 24 | } 25 | 26 | return parameter; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ProxySuper.Core/Converters/VisibleConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace ProxySuper.Core.Converters 7 | { 8 | public class VisibleConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return value.Equals(true) ? Visibility.Visible : Visibility.Collapsed; 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | if (value == null) 18 | { 19 | return false; 20 | } 21 | 22 | if (value.Equals(Visibility.Visible)) 23 | { 24 | return true; 25 | } 26 | 27 | return false; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ProxySuper.Core/Extension/XrayExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | using ProxySuper.Core.Helpers; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Net.Http; 7 | using System.Threading.Tasks; 8 | using ProxySuper.Core.Models.External; 9 | using ProxySuper.Core.Models.Projects; 10 | 11 | namespace ProxySuper.Core.Extension 12 | { 13 | public static class XrayExtension 14 | { 15 | private static readonly HttpClient _httpClient; 16 | 17 | static XrayExtension() 18 | { 19 | _httpClient = HttpClientUtil.CreateHttpClient(5000); 20 | } 21 | 22 | public static async Task InitXrayCoreVersionListAsync() 23 | { 24 | var httpRequestMessage = 25 | new HttpRequestMessage(HttpMethod.Get, "https://api.github.com/repos/XTLS/Xray-core/releases"); 26 | httpRequestMessage.Headers.TryAddWithoutValidation("Accept", "application/vnd.github+json"); 27 | httpRequestMessage.Headers.TryAddWithoutValidation("X-GitHub-Api-Version", "2022-11-28"); 28 | httpRequestMessage.Headers.TryAddWithoutValidation("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.42"); 29 | 30 | try 31 | { 32 | var response = await _httpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); 33 | if (!response.IsSuccessStatusCode) 34 | { 35 | return; 36 | } 37 | 38 | XraySettings.XrayCoreVersionList = JsonConvert 39 | .DeserializeObject>(await response.Content.ReadAsStringAsync()) 40 | ?.Select(e => $"{e.Version} {(e.IsPreRelease ? "[PRE]" : string.Empty)}") 41 | .ToList(); 42 | } 43 | catch (Exception) 44 | { 45 | // ignore 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /ProxySuper.Core/Helpers/DateTimeUtils.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Globalization; 4 | using System.Net; 5 | using System.Runtime.InteropServices; 6 | 7 | namespace ProxySuper.Core.Helpers 8 | { 9 | public static class DateTimeUtils 10 | { 11 | /// 12 | /// 从国家授时中心获取标准GMT时间,读取https://www.tsa.cn 13 | /// GMT时间与UTC时间没有差别,可以UTC=GMT 14 | /// 15 | /// 返回网络时间 16 | public static DateTime GetUTCTime() 17 | { 18 | DateTime time; 19 | try 20 | { 21 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.tsa.cn"); 22 | request.Method = "HEAD"; 23 | request.AllowAutoRedirect = false; 24 | HttpWebResponse reponse = (HttpWebResponse)request.GetResponse(); 25 | string cc = reponse.GetResponseHeader("date"); 26 | reponse.Close(); 27 | 28 | bool s = GMTStrParse(cc, out time); 29 | return time; 30 | } 31 | catch 32 | { 33 | return new DateTime(1970, 1, 1, 0, 0, 0, 0); 34 | } 35 | } 36 | 37 | public static bool GMTStrParse(string gmtStr, out DateTime gmtTime) //抓取的date是GMT格式的字符串,这里转成datetime 38 | { 39 | CultureInfo enUS = new CultureInfo("en-US"); 40 | bool s = DateTime.TryParseExact(gmtStr, "r", enUS, DateTimeStyles.None, out gmtTime); 41 | return s; 42 | } 43 | 44 | //设置系统时间的API函数 45 | [DllImport("kernel32.dll")] 46 | private static extern bool SetLocalTime(ref SYSTEMTIME time); 47 | 48 | [StructLayout(LayoutKind.Sequential)] 49 | private struct SYSTEMTIME 50 | { 51 | public short year; 52 | public short month; 53 | public short dayOfWeek; 54 | public short day; 55 | public short hour; 56 | public short minute; 57 | public short second; 58 | public short milliseconds; 59 | } 60 | 61 | /// 62 | /// 设置系统时间 63 | /// 64 | /// 需要设置的时间 65 | /// 返回系统时间设置状态,true为成功,false为失败 66 | public static bool SetDate(DateTime dt) 67 | { 68 | SYSTEMTIME st; 69 | 70 | st.year = (short)dt.Year; 71 | st.month = (short)dt.Month; 72 | st.dayOfWeek = (short)dt.DayOfWeek; 73 | st.day = (short)dt.Day; 74 | st.hour = (short)dt.Hour; 75 | st.minute = (short)dt.Minute; 76 | st.second = (short)dt.Second; 77 | st.milliseconds = (short)dt.Millisecond; 78 | bool rt = SetLocalTime(ref st); 79 | return rt; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ProxySuper.Core/Helpers/HttpClientUtil.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http.Headers; 2 | using System.Net.Http; 3 | using System.Net; 4 | using System; 5 | 6 | namespace ProxySuper.Core.Helpers 7 | { 8 | public class HttpClientUtil 9 | { 10 | /// 11 | /// ProxyServer Environment Var. 12 | /// 13 | public const string ProxyServerVar = "DOTNET_PROXY_SERVER"; 14 | 15 | /// 16 | /// 创建HttpClient. 17 | /// 18 | /// timeout milliseconds. 19 | /// . 20 | public static HttpClient CreateHttpClient(double? timeoutMilliseconds = null) 21 | { 22 | var defaultHttpClientHandler = new HttpClientHandler 23 | { 24 | AllowAutoRedirect = true, 25 | AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate, 26 | 27 | // allow concurrent request 28 | MaxConnectionsPerServer = 2000, 29 | 30 | // allow all ssl cert 31 | ServerCertificateCustomValidationCallback = (message, certificate2, sslPolicyError, arg4) => true, 32 | UseCookies = false, 33 | UseProxy = false, 34 | Proxy = null, 35 | }; 36 | 37 | var proxyServer = Environment.GetEnvironmentVariable(ProxyServerVar); 38 | if (proxyServer != null) 39 | { 40 | try 41 | { 42 | var proxyUri = new Uri(proxyServer); 43 | 44 | // has proxy server 45 | defaultHttpClientHandler.UseProxy = true; 46 | defaultHttpClientHandler.Proxy = new WebProxy(proxyUri); 47 | } 48 | catch (UriFormatException) 49 | { 50 | // ignore 51 | } 52 | } 53 | 54 | var httpClient = new HttpClient(defaultHttpClientHandler); 55 | 56 | if (timeoutMilliseconds.HasValue) 57 | { 58 | httpClient.Timeout = TimeSpan.FromMilliseconds(timeoutMilliseconds.Value); 59 | } 60 | 61 | httpClient.DefaultRequestHeaders.ConnectionClose = false; 62 | httpClient.DefaultRequestHeaders.CacheControl = new CacheControlHeaderValue { NoCache = true }; 63 | httpClient.MaxResponseContentBufferSize = 1024 * 1024 * 1024; 64 | 65 | return httpClient; 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /ProxySuper.Core/Helpers/Utils.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Linq; 4 | 5 | namespace ProxySuper.Core.Services 6 | { 7 | public class Utils 8 | { 9 | public static string Base64Encode(string plainText) 10 | { 11 | var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText); 12 | return System.Convert.ToBase64String(plainTextBytes); 13 | } 14 | 15 | public static string Base64Decode(string base64EncodedData) 16 | { 17 | var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData); 18 | return System.Text.Encoding.UTF8.GetString(base64EncodedBytes); 19 | } 20 | 21 | public static T DeepClone(T obj) where T : class 22 | { 23 | var serialized = JsonConvert.SerializeObject(obj); 24 | return JsonConvert.DeserializeObject(serialized); 25 | } 26 | 27 | public static string GetTickID() 28 | { 29 | return DateTime.Now.Ticks.ToString(); 30 | } 31 | 32 | private static Random random = new Random(); 33 | public static string RandomString(int length) 34 | { 35 | const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 36 | return new string(Enumerable.Repeat(chars, length) 37 | .Select(s => s[random.Next(s.Length)]).ToArray()); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Caddy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ProxySuper.Core.Models 8 | { 9 | public static class Caddy 10 | { 11 | public static string Service = @" 12 | [Unit] 13 | Description=Caddy 14 | Documentation=https://caddyserver.com/docs/ 15 | After=network.target network-online.target 16 | Requires=network-online.target 17 | 18 | [Service] 19 | #User=caddy 20 | #Group=caddy 21 | User=root 22 | Group=root 23 | ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile 24 | ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile 25 | TimeoutStopSec=5s 26 | #LimitNOFILE=1048576 27 | #LimitNPROC=512 28 | PrivateTmp=true 29 | ProtectSystem=full 30 | #AmbientCapabilities=CAP_NET_BIND_SERVICE 31 | 32 | [Install] 33 | WantedBy=multi-user.target 34 | "; 35 | 36 | public static string DefaultCaddyFile = @" 37 | :80 { 38 | respond ""Hello world!""; 39 | } 40 | "; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/External/XrayVersionResponse.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace ProxySuper.Core.Models.External 4 | { 5 | public class XrayVersionResponse 6 | { 7 | [JsonProperty("prerelease")] 8 | public bool IsPreRelease { get; set; } 9 | 10 | [JsonProperty("tag_name")] 11 | public string Version { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Hosts/Host.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32; 2 | using MvvmCross.Commands; 3 | using Newtonsoft.Json; 4 | using System.ComponentModel; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace ProxySuper.Core.Models.Hosts 9 | { 10 | public class Host 11 | { 12 | 13 | public Host() 14 | { 15 | Proxy = new LocalProxy(); 16 | } 17 | 18 | 19 | public string Tag { get; set; } 20 | 21 | public string Address { get; set; } 22 | 23 | public string UserName { get; set; } 24 | 25 | public string Password { get; set; } 26 | 27 | public int Port { get; set; } = 22; 28 | 29 | public string PrivateKeyPath { get; set; } 30 | 31 | public LocalProxy Proxy { get; set; } 32 | 33 | public LoginSecretType SecretType { get; set; } 34 | 35 | public IMvxCommand UploadPrivateKeyCommand => new MvxCommand(UploadPrivateKey); 36 | 37 | private void UploadPrivateKey() 38 | { 39 | var fileDialog = new OpenFileDialog(); 40 | fileDialog.FileOk += OnFileOk; 41 | fileDialog.ShowDialog(); 42 | } 43 | 44 | private void OnFileOk(object sender, CancelEventArgs e) 45 | { 46 | var file = sender as OpenFileDialog; 47 | PrivateKeyPath = file.FileName; 48 | 49 | Task.Delay(300).ContinueWith((t) => 50 | { 51 | MessageBox.Show("上传成功", "提示"); 52 | }); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Hosts/LocalProxy.cs: -------------------------------------------------------------------------------- 1 | using Renci.SshNet; 2 | 3 | namespace ProxySuper.Core.Models.Hosts 4 | { 5 | public class LocalProxy 6 | { 7 | public string Address { get; set; } = "127.0.0.1"; 8 | 9 | public int Port { get; set; } = 1080; 10 | 11 | public ProxyTypes Type { get; set; } 12 | 13 | public string UserName { get; set; } 14 | 15 | public string Password { get; set; } 16 | 17 | } 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Hosts/LoginSecretType.cs: -------------------------------------------------------------------------------- 1 | namespace ProxySuper.Core.Models.Hosts 2 | { 3 | public enum LoginSecretType 4 | { 5 | Password = 0, 6 | PrivateKey = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/ProjectProgress.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ProxySuper.Core.Models 8 | { 9 | public class ProjectProgress 10 | { 11 | private string _step; 12 | 13 | private string _desc; 14 | 15 | private int _percentage; 16 | 17 | private string _logs; 18 | 19 | public ProjectProgress() 20 | { 21 | _step = "步骤"; 22 | 23 | _desc = "步骤描述"; 24 | 25 | _percentage = 0; 26 | 27 | _logs = string.Empty; 28 | 29 | StepUpdate = () => { }; 30 | } 31 | 32 | 33 | public Action StepUpdate { get; set; } 34 | 35 | public Action LogsUpdate { get; set; } 36 | 37 | public string Desc 38 | { 39 | get { return _desc; } 40 | set 41 | { 42 | _desc = value; 43 | StepUpdate(); 44 | 45 | _logs += _desc + "\n"; 46 | LogsUpdate(); 47 | } 48 | } 49 | 50 | public string Step 51 | { 52 | get { return _step; } 53 | set 54 | { 55 | _step = value; 56 | StepUpdate(); 57 | 58 | _logs += Step + "\n"; 59 | LogsUpdate(); 60 | } 61 | } 62 | 63 | public int Percentage 64 | { 65 | get { return _percentage; } 66 | set 67 | { 68 | _percentage = value; 69 | StepUpdate(); 70 | } 71 | } 72 | 73 | public string Logs 74 | { 75 | get { return _logs; } 76 | set 77 | { 78 | _logs = value; 79 | LogsUpdate(); 80 | } 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/BrookSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ProxySuper.Core.Models.Projects 4 | { 5 | public class BrookSettings : IProjectSettings 6 | { 7 | public string Domain { get; set; } 8 | 9 | public string IP { get; set; } 10 | 11 | public string Password { get; set; } 12 | 13 | public BrookType BrookType { get; set; } 14 | 15 | public int Port { get; set; } = 443; 16 | 17 | public List FreePorts 18 | { 19 | get 20 | { 21 | if (Port == 443) 22 | { 23 | return new List { 80, 443 }; 24 | } 25 | return new List { Port }; 26 | } 27 | } 28 | 29 | public string Email => "server@brook.com"; 30 | 31 | public ProjectType Type { get; set; } = ProjectType.Brook; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/BrookType.cs: -------------------------------------------------------------------------------- 1 | namespace ProxySuper.Core.Models.Projects 2 | { 3 | public enum BrookType 4 | { 5 | server, 6 | wsserver, 7 | wssserver, 8 | socks5 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/HysteriaSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ProxySuper.Core.Models.Projects 8 | { 9 | public class HysteriaSettings 10 | { 11 | public string Domain { get; set; } = ""; 12 | 13 | public string Obfs { get; set; } = ""; 14 | 15 | public string Email { get; set; } = ""; 16 | 17 | public string Protocol { get; set; } = "udp"; 18 | 19 | public int Port { get; set; } = 36712; 20 | 21 | public int UpMbps { get; set; } = 300; 22 | 23 | public int DownMbps { get; set; } = 300; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/IProjectSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ProxySuper.Core.Models.Projects 4 | { 5 | public interface IProjectSettings 6 | { 7 | /// 8 | /// 端口 9 | /// 10 | int Port { get; set; } 11 | 12 | /// 13 | /// 域名 14 | /// 15 | string Domain { get; set; } 16 | 17 | /// 18 | /// 额外需要开放的端口 19 | /// 20 | List FreePorts { get; } 21 | 22 | /// 23 | /// 类型 24 | /// 25 | //ProjectType Type { get; set; } 26 | 27 | /// 28 | /// 邮箱 29 | /// 30 | string Email { get; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/MTProtoGoSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ProxySuper.Core.Models.Projects 8 | { 9 | public class MTProtoGoSettings : IProjectSettings 10 | { 11 | public MTProtoGoSettings() 12 | { 13 | Port = 443; 14 | 15 | Domain = string.Empty; 16 | 17 | Cleartext = "bing.com"; 18 | 19 | SecretText = string.Empty; 20 | } 21 | 22 | public int Port { get; set; } 23 | 24 | public string Domain { get; set; } 25 | 26 | public List FreePorts => new List { Port }; 27 | 28 | public string Email => ""; 29 | 30 | public string Cleartext { get; set; } 31 | 32 | public string SecretText { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/NaiveProxySettings.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace ProxySuper.Core.Models.Projects 6 | { 7 | public class NaiveProxySettings : IProjectSettings 8 | { 9 | public NaiveProxySettings() 10 | { 11 | Port = 443; 12 | } 13 | 14 | public List FreePorts 15 | { 16 | get 17 | { 18 | return new List { 80, 443, Port }.Distinct().ToList(); 19 | } 20 | } 21 | 22 | public ProjectType Type { get; set; } = ProjectType.NaiveProxy; 23 | 24 | public int Port { get; set; } 25 | 26 | public string Domain { get; set; } 27 | 28 | public string UserName { get; set; } 29 | 30 | public string Password { get; set; } 31 | 32 | public string MaskDomain { get; set; } 33 | 34 | [JsonIgnore] 35 | public string Email 36 | { 37 | get 38 | { 39 | if (!string.IsNullOrEmpty(Domain)) 40 | { 41 | var arr = Domain.Split('.'); 42 | if (arr.Length == 3) 43 | { 44 | return $"{arr[0]}@{arr[1]}.{arr[2]}"; 45 | } 46 | } 47 | 48 | 49 | return $"{UserName + Port.ToString()}@gmail.com"; 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/ProjectType.cs: -------------------------------------------------------------------------------- 1 | namespace ProxySuper.Core.Models.Projects 2 | { 3 | public enum ProjectType 4 | { 5 | Xray = 0, 6 | TrojanGo = 1, 7 | NaiveProxy = 2, 8 | Brook = 3, 9 | V2ray = 4, 10 | MTProtoGo = 5, 11 | Hysteria = 6, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/RayType.cs: -------------------------------------------------------------------------------- 1 | namespace ProxySuper.Core.Models.Projects 2 | { 3 | public enum RayType 4 | { 5 | // 入口 6 | VLESS_TCP_XTLS = 100, 7 | 8 | // VLESS 101开头 9 | VLESS_TCP = 101, 10 | VLESS_WS = 102, 11 | VLESS_H2 = 103, 12 | VLESS_KCP = 104, 13 | VLESS_QUIC = 105, 14 | VLESS_gRPC = 110, 15 | 16 | // VMESS 201开头 17 | VMESS_TCP = 201, 18 | VMESS_WS = 202, 19 | VMESS_H2 = 203, 20 | VMESS_KCP = 204, 21 | VMESS_QUIC = 205, 22 | 23 | // Trojan 301开头 24 | Trojan_TCP = 301, 25 | Trojan_WS = 302, 26 | 27 | // SS 28 | ShadowsocksAEAD = 401 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/TrojanGoSettings.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace ProxySuper.Core.Models.Projects 7 | { 8 | public class TrojanGoSettings : IProjectSettings 9 | { 10 | public TrojanGoSettings() 11 | { 12 | WithTLS = true; 13 | Port = 443; 14 | WebSocketPath = "/ws"; 15 | Password = Guid.NewGuid().ToString(); 16 | } 17 | 18 | public List FreePorts 19 | { 20 | get 21 | { 22 | return new List { 80, 443, Port }.Distinct().ToList(); 23 | } 24 | } 25 | 26 | public ProjectType Type { get; set; } = ProjectType.TrojanGo; 27 | 28 | /// 29 | /// 是否安装TLS证书 30 | /// 31 | public bool WithTLS { get; set; } 32 | 33 | /// 34 | /// 域名 35 | /// 36 | public string Domain { get; set; } 37 | 38 | /// 39 | /// 端口 40 | /// 41 | public int Port { get; set; } 42 | 43 | /// 44 | /// 密码 45 | /// 46 | public string Password { get; set; } 47 | 48 | /// 49 | /// 伪装域名 50 | /// 51 | public string MaskDomain { get; set; } 52 | 53 | /// 54 | /// 是否开启WebSocket 55 | /// 56 | [JsonIgnore] 57 | public bool EnableWebSocket 58 | { 59 | get 60 | { 61 | return !string.IsNullOrEmpty(WebSocketPath); 62 | } 63 | } 64 | 65 | /// 66 | /// websocket路径 67 | /// 68 | public string WebSocketPath { get; set; } 69 | 70 | 71 | [JsonIgnore] 72 | public string Email 73 | { 74 | get 75 | { 76 | if (!string.IsNullOrEmpty(Domain)) 77 | { 78 | var arr = Domain.Split('.'); 79 | if (arr.Length == 3) 80 | { 81 | return $"{arr[0]}@{arr[1]}.{arr[2]}"; 82 | } 83 | } 84 | 85 | var prefix = Password.Length > 7 ? Password.Substring(0, 7) : Password; 86 | return $"{prefix}@gmail.com"; 87 | } 88 | } 89 | 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/V2raySettings_SS.cs: -------------------------------------------------------------------------------- 1 | using ProxySuper.Core.Services; 2 | 3 | namespace ProxySuper.Core.Models.Projects 4 | { 5 | public partial class V2raySettings 6 | { 7 | /// 8 | /// ss password 9 | /// 10 | public string ShadowSocksPassword { get; set; } 11 | 12 | /// 13 | /// ss method 14 | /// 15 | public string ShadowSocksMethod { get; set; } 16 | 17 | /// 18 | /// ss port 19 | /// 20 | public int ShadowSocksPort { get; set; } 21 | 22 | /// 23 | /// share link 24 | /// 25 | public string ShadowSocksShareLink 26 | { 27 | get 28 | { 29 | return ShareLink.Build(RayType.ShadowsocksAEAD, this); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/V2raySettings_Trojan.cs: -------------------------------------------------------------------------------- 1 | using ProxySuper.Core.Services; 2 | 3 | namespace ProxySuper.Core.Models.Projects 4 | { 5 | public partial class V2raySettings 6 | { 7 | public string TrojanPassword { get; set; } 8 | 9 | public string Trojan_TCP_ShareLink 10 | { 11 | get 12 | { 13 | return ShareLink.Build(RayType.Trojan_TCP, this); 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/V2raySettings_VLESS.cs: -------------------------------------------------------------------------------- 1 | using ProxySuper.Core.Services; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Documents; 5 | 6 | namespace ProxySuper.Core.Models.Projects 7 | { 8 | public partial class V2raySettings 9 | { 10 | /// 11 | /// vless tcp shareLink 12 | /// 13 | public string VLESS_TCP_ShareLink 14 | { 15 | get 16 | { 17 | return ShareLink.Build(RayType.VLESS_TCP, this); 18 | } 19 | } 20 | 21 | /// 22 | /// websocket path 23 | /// 24 | public string VLESS_WS_Path { get; set; } 25 | 26 | /// 27 | /// VLESS WS ShareLink 28 | /// 29 | public string VLESS_WS_ShareLink 30 | { 31 | get 32 | { 33 | return ShareLink.Build(RayType.VLESS_WS, this); 34 | } 35 | } 36 | 37 | /// 38 | /// kcp seed 39 | /// 40 | public string VLESS_KCP_Seed { get; set; } 41 | 42 | /// 43 | /// kcp type 44 | /// 45 | public string VLESS_KCP_Type { get; set; } 46 | 47 | /// 48 | /// kcp port 49 | /// 50 | public int VLESS_KCP_Port { get; set; } 51 | 52 | /// 53 | /// VLESS KCP ShareLink 54 | /// 55 | public string VLESS_KCP_ShareLink 56 | { 57 | get 58 | { 59 | return ShareLink.Build(RayType.VLESS_KCP, this); 60 | } 61 | } 62 | 63 | /// 64 | /// vless quic security 65 | /// 66 | public string VLESS_QUIC_Security { get; set; } 67 | 68 | /// 69 | /// vless quic type 70 | /// 71 | public string VLESS_QUIC_Type { get; set; } 72 | 73 | /// 74 | /// vless quic port 75 | /// 76 | public int VLESS_QUIC_Port { get; set; } 77 | 78 | /// 79 | /// vless quic key 80 | /// 81 | public string VLESS_QUIC_Key { get; set; } 82 | 83 | /// 84 | /// vless quic ShareLink 85 | /// 86 | public string VLESS_QUIC_ShareLink 87 | { 88 | get 89 | { 90 | return ShareLink.Build(RayType.VLESS_QUIC, this); 91 | } 92 | } 93 | 94 | /// 95 | /// grpc port 96 | /// 97 | public int VLESS_gRPC_Port { get; set; } 98 | 99 | /// 100 | /// grpc service name 101 | /// 102 | public string VLESS_gRPC_ServiceName { get; set; } 103 | 104 | /// 105 | /// vless grpc share link 106 | /// 107 | public string VLESS_gRPC_ShareLink 108 | { 109 | get 110 | { 111 | return ShareLink.Build(RayType.VLESS_gRPC, this); 112 | } 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/V2raySettings_VMESS.cs: -------------------------------------------------------------------------------- 1 | using ProxySuper.Core.Services; 2 | 3 | namespace ProxySuper.Core.Models.Projects 4 | { 5 | public partial class V2raySettings 6 | { 7 | /// 8 | /// vmess websocket path 9 | /// 10 | public string VMESS_WS_Path { get; set; } 11 | 12 | /// 13 | /// vmess ws sharelink 14 | /// 15 | public string VMESS_WS_ShareLink 16 | { 17 | get 18 | { 19 | return ShareLink.Build(RayType.VMESS_WS, this); 20 | } 21 | } 22 | 23 | /// 24 | /// mvess tcp path 25 | /// 26 | public string VMESS_TCP_Path { get; set; } 27 | 28 | /// 29 | /// vmess tcp ShareLink 30 | /// 31 | public string VMESS_TCP_ShareLink 32 | { 33 | get 34 | { 35 | return ShareLink.Build(RayType.VMESS_TCP, this); 36 | } 37 | } 38 | 39 | /// 40 | /// vmess kcp seed 41 | /// 42 | public string VMESS_KCP_Seed { get; set; } 43 | 44 | /// 45 | /// vmess kcp type 46 | /// 47 | public string VMESS_KCP_Type { get; set; } 48 | 49 | /// 50 | /// vmess kcp port 51 | /// 52 | public int VMESS_KCP_Port { get; set; } 53 | 54 | /// 55 | /// vmess kcp ShareLink 56 | /// 57 | public string VMESS_KCP_ShareLink 58 | { 59 | get 60 | { 61 | return ShareLink.Build(RayType.VMESS_KCP, this); 62 | } 63 | } 64 | 65 | /// 66 | /// vmess quic security 67 | /// 68 | public string VMESS_QUIC_Security { get; set; } 69 | 70 | /// 71 | /// vmess quic type 72 | /// 73 | public string VMESS_QUIC_Type { get; set; } 74 | 75 | /// 76 | /// vmess quic port 77 | /// 78 | public int VMESS_QUIC_Port { get; set; } 79 | 80 | /// 81 | /// vmess quic key 82 | /// 83 | public string VMESS_QUIC_Key { get; set; } 84 | 85 | /// 86 | /// vmess quic ShareLink 87 | /// 88 | public string VMESS_QUIC_ShareLink 89 | { 90 | get 91 | { 92 | return ShareLink.Build(RayType.VMESS_QUIC, this); 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /ProxySuper.Core/Models/Projects/XraySettings.cs: -------------------------------------------------------------------------------- 1 | using ProxySuper.Core.Services; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace ProxySuper.Core.Models.Projects 6 | { 7 | public class XraySettings : V2raySettings 8 | { 9 | public static List FlowList = new List { "xtls-rprx-vision", "xtls-rprx-vision-udp443", "xtls-rprx-vision,none", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443", "xtls-rprx-splice", "xtls-rprx-splice-udp443" }; 10 | public static List UTLSList = new List { "", "chrome", "firefox", "safari", "randomized" }; 11 | public static List XrayCoreVersionList = new List { string.Empty }; 12 | 13 | public string UTLS { get; set; } = UTLSList[1]; 14 | 15 | public string Flow { get; set; } = FlowList[0]; 16 | 17 | public string XrayCoreVersion { get; set; } = XrayCoreVersionList.FirstOrDefault(); 18 | 19 | /// 20 | /// vless xtls shareLink 21 | /// 22 | public string VLESS_TCP_XTLS_ShareLink 23 | { 24 | get 25 | { 26 | return ShareLink.Build(RayType.VLESS_TCP_XTLS, this); 27 | } 28 | } 29 | 30 | public string GetXrayCoreVersion() 31 | { 32 | return string.IsNullOrEmpty(XrayCoreVersion) 33 | ? string.Empty 34 | : $" --version {XrayCoreVersion.Replace("[PRE]", string.Empty).Replace("v", string.Empty)}"; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ProxySuper.Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // 有关程序集的一般信息由以下 5 | // 控制。更改这些特性值可修改 6 | // 与程序集关联的信息。 7 | [assembly: AssemblyTitle("ProxySuper.Core")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("ProxySuper.Core")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // 将 ComVisible 设置为 false 会使此程序集中的类型 17 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 18 | //请将此类型的 ComVisible 特性设置为 true。 19 | [assembly: ComVisible(false)] 20 | 21 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 22 | [assembly: Guid("15779ee6-d8ca-44bf-bfe2-941e155eef3f")] 23 | 24 | // 程序集的版本信息由下列四个值组成: 25 | // 26 | // 主版本 27 | // 次版本 28 | // 生成号 29 | // 修订号 30 | // 31 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 32 | //通过使用 "*",如下所示: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /ProxySuper.Core/Services/TrojanGoConfigBuilder.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Linq; 3 | using ProxySuper.Core.Models.Projects; 4 | using System.IO; 5 | 6 | namespace ProxySuper.Core.Services 7 | { 8 | public class TrojanGoConfigBuilder 9 | { 10 | public static readonly int WebPort = 8088; 11 | 12 | public static readonly string TrojanGoSettingPath = @"Templates\trojan-go\trojan-go.json"; 13 | 14 | public static readonly string CaddyFilePath = @"Templates\trojan-go\base.caddyfile"; 15 | 16 | public static string BuildTrojanGoConfig(TrojanGoSettings parameters) 17 | { 18 | var jsonStr = File.ReadAllText(TrojanGoSettingPath); 19 | var settings = JToken.FromObject(JsonConvert.DeserializeObject(jsonStr)); 20 | 21 | settings["remote_port"] = WebPort; 22 | settings["password"][0] = parameters.Password; 23 | settings["ssl"]["sni"] = parameters.Domain; 24 | 25 | if (parameters.EnableWebSocket) 26 | { 27 | settings["websocket"]["enabled"] = true; 28 | settings["websocket"]["path"] = parameters.WebSocketPath; 29 | settings["websocket"]["host"] = parameters.Domain; 30 | } 31 | 32 | return JsonConvert.SerializeObject(settings, Formatting.Indented, new JsonSerializerSettings() 33 | { 34 | NullValueHandling = NullValueHandling.Ignore 35 | }); 36 | } 37 | 38 | public static string BuildCaddyConfig(TrojanGoSettings parameters, bool useCustomWeb = false) 39 | { 40 | var caddyStr = File.ReadAllText(CaddyFilePath); 41 | caddyStr = caddyStr.Replace("##domain##", parameters.Domain); 42 | caddyStr = caddyStr.Replace("##port##", WebPort.ToString()); 43 | 44 | if (!useCustomWeb && !string.IsNullOrEmpty(parameters.MaskDomain)) 45 | { 46 | var prefix = "http://"; 47 | if (parameters.MaskDomain.StartsWith("https://")) 48 | { 49 | prefix = "https://"; 50 | } 51 | var domain = parameters.MaskDomain 52 | .TrimStart("http://".ToCharArray()) 53 | .TrimStart("https://".ToCharArray()); 54 | 55 | caddyStr = caddyStr.Replace("##reverse_proxy##", $"reverse_proxy {prefix}{domain} {{ \n header_up Host {domain} \n }}"); 56 | } 57 | else 58 | { 59 | caddyStr = caddyStr.Replace("##reverse_proxy##", ""); 60 | } 61 | 62 | return caddyStr; 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/BrookConfigViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models.Projects; 3 | using ProxySuper.Core.Services; 4 | 5 | namespace ProxySuper.Core.ViewModels 6 | { 7 | public class BrookConfigViewModel : MvxViewModel 8 | { 9 | public BrookSettings Settings { get; set; } 10 | 11 | public override void Prepare(BrookSettings parameter) 12 | { 13 | Settings = parameter; 14 | } 15 | 16 | public string Link 17 | { 18 | get 19 | { 20 | return ShareLink.BuildBrook(Settings); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/BrookInstallViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.ViewModels; 3 | using ProxySuper.Core.Models; 4 | using ProxySuper.Core.Models.Hosts; 5 | using ProxySuper.Core.Models.Projects; 6 | using ProxySuper.Core.Services; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace ProxySuper.Core.ViewModels 15 | { 16 | public class BrookInstallViewModel : MvxViewModel 17 | { 18 | Host _host; 19 | 20 | BrookSettings _settings; 21 | 22 | BrookService _service; 23 | 24 | public override void Prepare(Record parameter) 25 | { 26 | _host = parameter.Host; 27 | _settings = parameter.BrookSettings; 28 | } 29 | 30 | public override Task Initialize() 31 | { 32 | _service = new BrookService(_host, _settings); 33 | _service.Progress.StepUpdate = () => RaisePropertyChanged("Progress"); 34 | _service.Progress.LogsUpdate = () => RaisePropertyChanged("Logs"); 35 | _service.Connect(); 36 | return base.Initialize(); 37 | } 38 | 39 | public override void ViewDestroy(bool viewFinishing = true) 40 | { 41 | _service.Disconnect(); 42 | this.SaveInstallLog(); 43 | base.ViewDestroy(viewFinishing); 44 | } 45 | 46 | public ProjectProgress Progress => _service.Progress; 47 | 48 | public string Logs => _service.Progress.Logs; 49 | 50 | public IMvxCommand InstallCommand => new MvxCommand(_service.Install); 51 | 52 | public IMvxCommand UninstallCommand => new MvxCommand(_service.Uninstall); 53 | 54 | private void SaveInstallLog() 55 | { 56 | if (!Directory.Exists("Logs")) 57 | { 58 | Directory.CreateDirectory("Logs"); 59 | } 60 | 61 | var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".brook.txt"); 62 | File.WriteAllText(fileName, Logs); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.Navigation; 3 | using MvvmCross.ViewModels; 4 | using ProxySuper.Core.Models; 5 | using ProxySuper.Core.Models.Hosts; 6 | using ProxySuper.Core.Models.Projects; 7 | using ProxySuper.Core.Services; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | using System.Windows.Navigation; 14 | 15 | namespace ProxySuper.Core.ViewModels 16 | { 17 | public class HysteriaEditorViewModel : MvxViewModel 18 | { 19 | public string Id { get; set; } 20 | 21 | public Host Host { get; set; } 22 | 23 | public HysteriaSettings Settings { get; set; } 24 | 25 | public IMvxNavigationService NavigationService { get; } 26 | 27 | public IMvxCommand SaveCommand => new MvxCommand(() => Save()); 28 | 29 | public IMvxCommand SaveAndInstallCommand => new MvxCommand(SaveAndInstall); 30 | 31 | public HysteriaEditorViewModel(IMvxNavigationService mvxNavigationService) 32 | { 33 | NavigationService = mvxNavigationService; 34 | } 35 | 36 | public override void Prepare(Record parameter) 37 | { 38 | var record = Utils.DeepClone(parameter); 39 | 40 | Id = record.Id; 41 | Host = record.Host; 42 | Settings = record.HysteriaSettings; 43 | } 44 | 45 | public void Save() 46 | { 47 | NavigationService.Close(this, new Record 48 | { 49 | Id = Id, 50 | Host = Host, 51 | HysteriaSettings = Settings, 52 | }); 53 | } 54 | 55 | public void SaveAndInstall() 56 | { 57 | var record = new Record 58 | { 59 | Id = Id, 60 | Host = Host, 61 | HysteriaSettings = Settings, 62 | }; 63 | 64 | NavigationService.Close(this, record); 65 | NavigationService.Navigate(record); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models; 3 | using ProxySuper.Core.Models.Hosts; 4 | using ProxySuper.Core.Models.Projects; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace ProxySuper.Core.ViewModels 12 | { 13 | public class HysteriaInstallViewModel : MvxViewModel 14 | { 15 | public Host Host { get; set; } 16 | 17 | public HysteriaSettings Settings { get; set; } 18 | 19 | public override void Prepare(Record parameter) 20 | { 21 | Host = parameter.Host; 22 | Settings = parameter.HysteriaSettings; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/MTProtoGoConfigViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models; 3 | using ProxySuper.Core.Models.Projects; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace ProxySuper.Core.ViewModels 11 | { 12 | public class MTProtoGoConfigViewModel : MvxViewModel 13 | { 14 | public MTProtoGoSettings Settings { get; set; } 15 | 16 | public override void Prepare(MTProtoGoSettings parameter) 17 | { 18 | Settings = parameter; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/MTProtoGoEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.Navigation; 3 | using MvvmCross.ViewModels; 4 | using ProxySuper.Core.Models; 5 | using ProxySuper.Core.Models.Hosts; 6 | using ProxySuper.Core.Models.Projects; 7 | using ProxySuper.Core.Services; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace ProxySuper.Core.ViewModels 15 | { 16 | public class MTProtoGoEditorViewModel : MvxViewModel 17 | { 18 | public MTProtoGoEditorViewModel(IMvxNavigationService navigationService) 19 | { 20 | NavigationService = navigationService; 21 | } 22 | 23 | public IMvxNavigationService NavigationService { get; } 24 | 25 | public IMvxCommand SaveCommand => new MvxCommand(Save); 26 | 27 | public IMvxCommand SaveAndInstallCommand => new MvxCommand(SaveAndInstall); 28 | 29 | public string Id { get; set; } 30 | 31 | public Host Host { get; set; } 32 | 33 | public MTProtoGoSettings Settings { get; set; } 34 | 35 | public override void Prepare(Record parameter) 36 | { 37 | var record = Utils.DeepClone(parameter); 38 | 39 | Id = record.Id; 40 | Host = record.Host; 41 | Settings = record.MTProtoGoSettings; 42 | } 43 | 44 | private void Save() 45 | { 46 | NavigationService.Close(this, new Record 47 | { 48 | Id = this.Id, 49 | Host = this.Host, 50 | MTProtoGoSettings = Settings, 51 | }); 52 | } 53 | 54 | private void SaveAndInstall() 55 | { 56 | var record = new Record 57 | { 58 | Id = this.Id, 59 | Host = this.Host, 60 | MTProtoGoSettings = Settings, 61 | }; 62 | NavigationService.Close(this, record); 63 | NavigationService.Navigate(record); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/MTProtoGoInstallViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.ViewModels; 3 | using ProxySuper.Core.Models; 4 | using ProxySuper.Core.Models.Hosts; 5 | using ProxySuper.Core.Models.Projects; 6 | using ProxySuper.Core.Services; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace ProxySuper.Core.ViewModels 15 | { 16 | public class MTProtoGoInstallViewModel : MvxViewModel 17 | { 18 | Host _host; 19 | 20 | MTProtoGoSettings _settings; 21 | 22 | MTProtoGoService _mtproxyService; 23 | 24 | Action _onSave; 25 | 26 | public override void Prepare(Record parameter) 27 | { 28 | _host = parameter.Host; 29 | _settings = parameter.MTProtoGoSettings; 30 | _onSave = parameter.OnSave; 31 | } 32 | 33 | public override Task Initialize() 34 | { 35 | _mtproxyService = new MTProtoGoService(_host, _settings); 36 | _mtproxyService.Progress.StepUpdate = () => RaisePropertyChanged("Progress"); 37 | _mtproxyService.Progress.LogsUpdate = () => RaisePropertyChanged("Logs"); 38 | _mtproxyService.Connect(); 39 | return base.Initialize(); 40 | } 41 | 42 | public override void ViewDestroy(bool viewFinishing = true) 43 | { 44 | _mtproxyService.Disconnect(); 45 | this.SaveInstallLog(); 46 | base.ViewDestroy(viewFinishing); 47 | } 48 | 49 | public ProjectProgress Progress 50 | { 51 | get => _mtproxyService.Progress; 52 | } 53 | 54 | public string Logs 55 | { 56 | get => _mtproxyService.Progress.Logs; 57 | } 58 | 59 | 60 | #region Command 61 | 62 | public IMvxCommand InstallCommand => new MvxCommand(() => 63 | { 64 | _mtproxyService.Install(); 65 | 66 | // 安装时生成的Secret需要保存 67 | _onSave(); 68 | }); 69 | 70 | public IMvxCommand UpdateSettingsCommand => new MvxCommand(() => 71 | { 72 | _mtproxyService.UpdateSettings(); 73 | 74 | // 安装时生成的Secret需要保存 75 | _onSave(); 76 | }); 77 | 78 | public IMvxCommand UninstallCommand => new MvxCommand(_mtproxyService.Uninstall); 79 | 80 | #endregion 81 | 82 | 83 | private void SaveInstallLog() 84 | { 85 | if (!Directory.Exists("Logs")) 86 | { 87 | Directory.CreateDirectory("Logs"); 88 | } 89 | 90 | var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".mtproxy-go.txt"); 91 | File.WriteAllText(fileName, Logs); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/NaiveProxyConfigViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models.Projects; 3 | using ProxySuper.Core.Services; 4 | 5 | namespace ProxySuper.Core.ViewModels 6 | { 7 | public class NaiveProxyConfigViewModel : MvxViewModel 8 | { 9 | public NaiveProxySettings Settings { get; set; } 10 | 11 | public override void Prepare(NaiveProxySettings parameter) 12 | { 13 | Settings = parameter; 14 | } 15 | 16 | public string Link 17 | { 18 | get 19 | { 20 | return ShareLink.BuildNaiveProxy(Settings); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/NaiveProxyEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.Navigation; 3 | using MvvmCross.ViewModels; 4 | using ProxySuper.Core.Models; 5 | using ProxySuper.Core.Models.Hosts; 6 | using ProxySuper.Core.Models.Projects; 7 | using ProxySuper.Core.Services; 8 | 9 | namespace ProxySuper.Core.ViewModels 10 | { 11 | public class NaiveProxyEditorViewModel : MvxViewModel 12 | { 13 | public NaiveProxyEditorViewModel(IMvxNavigationService navigationService) 14 | { 15 | NavigationService = navigationService; 16 | } 17 | 18 | public IMvxNavigationService NavigationService { get; } 19 | 20 | public string Id { get; set; } 21 | 22 | public Host Host { get; set; } 23 | 24 | public NaiveProxySettings Settings { get; set; } 25 | 26 | public override void Prepare(Record parameter) 27 | { 28 | var record = Utils.DeepClone(parameter); 29 | 30 | Id = record.Id; 31 | Host = record.Host; 32 | Settings = record.NaiveProxySettings; 33 | } 34 | 35 | 36 | public IMvxCommand SaveCommand => new MvxCommand(Save); 37 | 38 | public IMvxCommand SaveAndInstallCommand => new MvxCommand(SaveAndInstall); 39 | 40 | private void Save() 41 | { 42 | NavigationService.Close(this, new Record 43 | { 44 | Id = Id, 45 | Host = Host, 46 | NaiveProxySettings = Settings 47 | }); 48 | } 49 | 50 | 51 | private void SaveAndInstall() 52 | { 53 | var record = new Record 54 | { 55 | Id = this.Id, 56 | Host = this.Host, 57 | NaiveProxySettings = Settings, 58 | }; 59 | NavigationService.Close(this, record); 60 | NavigationService.Navigate(record); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/NaiveProxyInstallViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.ViewModels; 3 | using ProxySuper.Core.Models; 4 | using ProxySuper.Core.Models.Hosts; 5 | using ProxySuper.Core.Models.Projects; 6 | using ProxySuper.Core.Services; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace ProxySuper.Core.ViewModels 15 | { 16 | public class NaiveProxyInstallViewModel : MvxViewModel 17 | { 18 | Host _host; 19 | 20 | NaiveProxySettings _settings; 21 | 22 | NaiveProxyService _service; 23 | 24 | public override void Prepare(Record parameter) 25 | { 26 | _host = parameter.Host; 27 | _settings = parameter.NaiveProxySettings; 28 | } 29 | 30 | public override Task Initialize() 31 | { 32 | _service = new NaiveProxyService(_host, _settings); 33 | _service.Progress.StepUpdate = () => RaisePropertyChanged("Progress"); 34 | _service.Progress.LogsUpdate = () => RaisePropertyChanged("Logs"); 35 | _service.Connect(); 36 | return base.Initialize(); 37 | } 38 | 39 | public override void ViewDestroy(bool viewFinishing = true) 40 | { 41 | _service.Disconnect(); 42 | this.SaveInstallLog(); 43 | base.ViewDestroy(viewFinishing); 44 | } 45 | 46 | 47 | public ProjectProgress Progress => _service.Progress; 48 | 49 | public string Logs => _service.Progress.Logs; 50 | 51 | 52 | #region Commands 53 | 54 | public IMvxCommand InstallCommand => new MvxCommand(_service.Install); 55 | 56 | public IMvxCommand UpdateSettingsCommand => new MvxCommand(_service.UpdateSettings); 57 | 58 | public IMvxCommand UninstallCommand => new MvxCommand(_service.Uninstall); 59 | 60 | public IMvxCommand UploadWebCommand => new MvxCommand(_service.UploadWeb); 61 | 62 | #endregion 63 | 64 | private void SaveInstallLog() 65 | { 66 | if (!Directory.Exists("Logs")) 67 | { 68 | Directory.CreateDirectory("Logs"); 69 | } 70 | 71 | var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".naiveproxy.txt"); 72 | File.WriteAllText(fileName, Logs); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/ShareLinkViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace ProxySuper.Core.ViewModels 7 | { 8 | public class ShareLinkViewModel : MvxViewModel> 9 | { 10 | public List Records { get; set; } 11 | 12 | public override void Prepare(List parameter) 13 | { 14 | Records = parameter; 15 | } 16 | 17 | public string ShareLinks 18 | { 19 | get 20 | { 21 | StringBuilder sb = new StringBuilder(); 22 | Records.ForEach(record => 23 | { 24 | var link = record.GetShareLink(); 25 | sb.AppendLine(link); 26 | }); 27 | return sb.ToString(); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/TrojanGoConfigViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models.Projects; 3 | using ProxySuper.Core.Services; 4 | 5 | namespace ProxySuper.Core.ViewModels 6 | { 7 | public class TrojanGoConfigViewModel : MvxViewModel 8 | { 9 | public TrojanGoSettings Settings { get; set; } 10 | 11 | public override void Prepare(TrojanGoSettings parameter) 12 | { 13 | Settings = parameter; 14 | } 15 | 16 | public string Link 17 | { 18 | get 19 | { 20 | return ShareLink.BuildTrojanGo(Settings); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/TrojanGoEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.Navigation; 3 | using MvvmCross.ViewModels; 4 | using ProxySuper.Core.Models; 5 | using ProxySuper.Core.Models.Hosts; 6 | using ProxySuper.Core.Models.Projects; 7 | using ProxySuper.Core.Services; 8 | 9 | namespace ProxySuper.Core.ViewModels 10 | { 11 | public class TrojanGoEditorViewModel : MvxViewModel 12 | { 13 | public TrojanGoEditorViewModel(IMvxNavigationService navigationService) 14 | { 15 | NavigationService = navigationService; 16 | } 17 | 18 | public IMvxNavigationService NavigationService { get; } 19 | 20 | public IMvxCommand SaveCommand => new MvxCommand(Save); 21 | 22 | public IMvxCommand SaveAndInstallCommand => new MvxCommand(SaveAndInstall); 23 | 24 | public string Id { get; set; } 25 | 26 | public Host Host { get; set; } 27 | 28 | public TrojanGoSettings Settings { get; set; } 29 | 30 | public override void Prepare(Record parameter) 31 | { 32 | var record = Utils.DeepClone(parameter); 33 | 34 | Id = record.Id; 35 | Host = record.Host; 36 | Settings = record.TrojanGoSettings; 37 | } 38 | 39 | private void Save() 40 | { 41 | NavigationService.Close(this, new Record 42 | { 43 | Id = this.Id, 44 | Host = this.Host, 45 | TrojanGoSettings = Settings, 46 | }); 47 | } 48 | 49 | private void SaveAndInstall() 50 | { 51 | var record = new Record 52 | { 53 | Id = this.Id, 54 | Host = this.Host, 55 | TrojanGoSettings = Settings, 56 | }; 57 | NavigationService.Close(this, record); 58 | NavigationService.Navigate(record); 59 | } 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/TrojanGoInstallViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.ViewModels; 3 | using ProxySuper.Core.Models; 4 | using ProxySuper.Core.Models.Hosts; 5 | using ProxySuper.Core.Models.Projects; 6 | using ProxySuper.Core.Services; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace ProxySuper.Core.ViewModels 15 | { 16 | public class TrojanGoInstallViewModel : MvxViewModel 17 | { 18 | Host _host; 19 | 20 | TrojanGoSettings _settings; 21 | 22 | TrojanGoService _trojanGoService; 23 | 24 | public override void Prepare(Record parameter) 25 | { 26 | _host = parameter.Host; 27 | _settings = parameter.TrojanGoSettings; 28 | } 29 | 30 | public override Task Initialize() 31 | { 32 | _trojanGoService = new TrojanGoService(_host, _settings); 33 | _trojanGoService.Progress.StepUpdate = () => RaisePropertyChanged("Progress"); 34 | _trojanGoService.Progress.LogsUpdate = () => RaisePropertyChanged("Logs"); 35 | _trojanGoService.Connect(); 36 | return base.Initialize(); 37 | } 38 | 39 | public override void ViewDestroy(bool viewFinishing = true) 40 | { 41 | _trojanGoService.Disconnect(); 42 | this.SaveInstallLog(); 43 | base.ViewDestroy(viewFinishing); 44 | } 45 | 46 | public ProjectProgress Progress 47 | { 48 | get => _trojanGoService.Progress; 49 | } 50 | 51 | public string Logs 52 | { 53 | get => _trojanGoService.Progress.Logs; 54 | } 55 | 56 | 57 | #region Command 58 | 59 | public IMvxCommand InstallCommand => new MvxCommand(_trojanGoService.Install); 60 | 61 | public IMvxCommand UpdateSettingsCommand => new MvxCommand(_trojanGoService.UpdateSettings); 62 | 63 | public IMvxCommand UninstallCommand => new MvxCommand(_trojanGoService.Uninstall); 64 | 65 | public IMvxCommand UploadCertCommand => new MvxCommand(_trojanGoService.UploadCert); 66 | 67 | public IMvxCommand UploadWebCommand => new MvxCommand(_trojanGoService.UploadWeb); 68 | 69 | public IMvxCommand ApplyForCertCommand => new MvxCommand(_trojanGoService.ApplyForCert); 70 | 71 | #endregion 72 | 73 | 74 | private void SaveInstallLog() 75 | { 76 | if (!Directory.Exists("Logs")) 77 | { 78 | Directory.CreateDirectory("Logs"); 79 | } 80 | 81 | var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".trojan-go.txt"); 82 | File.WriteAllText(fileName, Logs); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/V2rayConfigViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models.Projects; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace ProxySuper.Core.ViewModels 10 | { 11 | public class V2rayConfigViewModel : MvxViewModel 12 | { 13 | public V2raySettings Settings { get; set; } 14 | 15 | public override void Prepare(V2raySettings parameter) 16 | { 17 | Settings = parameter; 18 | } 19 | 20 | 21 | public bool Checked_VLESS_TCP 22 | { 23 | get 24 | { 25 | return Settings.Types.Contains(RayType.VLESS_TCP); 26 | } 27 | } 28 | 29 | public bool Checked_VLESS_WS 30 | { 31 | get 32 | { 33 | return Settings.Types.Contains(RayType.VLESS_WS); 34 | } 35 | } 36 | 37 | public bool Checked_VLESS_KCP 38 | { 39 | get 40 | { 41 | return Settings.Types.Contains(RayType.VLESS_KCP); 42 | } 43 | } 44 | 45 | public bool Checked_VLESS_QUIC 46 | { 47 | get 48 | { 49 | return Settings.Types.Contains(RayType.VLESS_QUIC); 50 | } 51 | } 52 | 53 | public bool Checked_VLESS_gRPC 54 | { 55 | get 56 | { 57 | return Settings.Types.Contains(RayType.VLESS_gRPC); 58 | } 59 | } 60 | 61 | public bool Checked_VMESS_TCP 62 | { 63 | get 64 | { 65 | return Settings.Types.Contains(RayType.VMESS_TCP); 66 | } 67 | } 68 | 69 | public bool Checked_VMESS_WS 70 | { 71 | get 72 | { 73 | return Settings.Types.Contains(RayType.VMESS_WS); 74 | } 75 | } 76 | 77 | public bool Checked_VMESS_KCP 78 | { 79 | get 80 | { 81 | return Settings.Types.Contains(RayType.VMESS_KCP); 82 | } 83 | } 84 | 85 | public bool Checked_VMESS_QUIC 86 | { 87 | get 88 | { 89 | return Settings.Types.Contains(RayType.VMESS_QUIC); 90 | } 91 | } 92 | 93 | public bool Checked_Trojan_TCP 94 | { 95 | get 96 | { 97 | return Settings.Types.Contains(RayType.Trojan_TCP); 98 | } 99 | } 100 | 101 | public bool CheckedShadowSocks 102 | { 103 | get 104 | { 105 | return Settings.Types.Contains(RayType.ShadowsocksAEAD); 106 | } 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/V2rayInstallViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.ViewModels; 3 | using ProxySuper.Core.Models; 4 | using ProxySuper.Core.Models.Hosts; 5 | using ProxySuper.Core.Models.Projects; 6 | using ProxySuper.Core.Services; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace ProxySuper.Core.ViewModels 15 | { 16 | public class V2rayInstallViewModel : MvxViewModel 17 | { 18 | Host _host; 19 | 20 | V2raySettings _settings; 21 | 22 | V2rayService _service; 23 | 24 | public override void ViewDestroy(bool viewFinishing = true) 25 | { 26 | _service.Disconnect(); 27 | this.SaveInstallLog(); 28 | base.ViewDestroy(viewFinishing); 29 | } 30 | 31 | public override void Prepare(Record parameter) 32 | { 33 | this._host = parameter.Host; 34 | this._settings = parameter.V2raySettings; 35 | } 36 | 37 | public override Task Initialize() 38 | { 39 | _service = new V2rayService(_host, _settings); 40 | _service.Progress.StepUpdate = () => RaisePropertyChanged("Progress"); 41 | _service.Progress.LogsUpdate = () => RaisePropertyChanged("Logs"); 42 | _service.Connect(); 43 | 44 | return base.Initialize(); 45 | } 46 | 47 | public ProjectProgress Progress 48 | { 49 | get => _service.Progress; 50 | } 51 | 52 | public string Logs 53 | { 54 | get => _service.Progress.Logs; 55 | } 56 | 57 | 58 | 59 | #region Command 60 | 61 | public IMvxCommand InstallCommand => new MvxCommand(_service.Install); 62 | 63 | public IMvxCommand UpdateSettingsCommand => new MvxCommand(_service.UpdateSettings); 64 | 65 | public IMvxCommand UpdateV2rayCoreCommand => new MvxCommand(_service.UpdateV2rayCore); 66 | 67 | public IMvxCommand UninstallCommand => new MvxCommand(_service.Uninstall); 68 | 69 | public IMvxCommand UploadCertCommand => new MvxCommand(_service.UploadCert); 70 | 71 | public IMvxCommand UploadWebCommand => new MvxCommand(_service.UploadWeb); 72 | 73 | public IMvxCommand ApplyForCertCommand => new MvxCommand(_service.ApplyForCert); 74 | 75 | #endregion 76 | 77 | private void SaveInstallLog() 78 | { 79 | if (!Directory.Exists("Logs")) 80 | { 81 | Directory.CreateDirectory("Logs"); 82 | } 83 | 84 | var fileName = Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".v2ray.txt"); 85 | File.WriteAllText(fileName, Logs); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/XrayConfigViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models.Projects; 3 | 4 | namespace ProxySuper.Core.ViewModels 5 | { 6 | public class XrayConfigViewModel : MvxViewModel 7 | { 8 | 9 | public XraySettings Settings { get; set; } 10 | 11 | public override void Prepare(XraySettings parameter) 12 | { 13 | Settings = parameter; 14 | } 15 | 16 | public string Flow 17 | { 18 | get { return Settings.Flow; } 19 | } 20 | 21 | public string UTLS 22 | { 23 | get { return Settings.UTLS; } 24 | } 25 | 26 | public bool Checked_VLESS_TCP_XTLS 27 | { 28 | get 29 | { 30 | return Settings.Types.Contains(RayType.VLESS_TCP_XTLS); 31 | } 32 | } 33 | 34 | public bool Checked_VLESS_TCP 35 | { 36 | get 37 | { 38 | return Settings.Types.Contains(RayType.VLESS_TCP); 39 | } 40 | } 41 | 42 | public bool Checked_VLESS_WS 43 | { 44 | get 45 | { 46 | return Settings.Types.Contains(RayType.VLESS_WS); 47 | } 48 | } 49 | 50 | public bool Checked_VLESS_KCP 51 | { 52 | get 53 | { 54 | return Settings.Types.Contains(RayType.VLESS_KCP); 55 | } 56 | } 57 | 58 | public bool Checked_VLESS_QUIC 59 | { 60 | get 61 | { 62 | return Settings.Types.Contains(RayType.VLESS_QUIC); 63 | } 64 | } 65 | 66 | public bool Checked_VLESS_gRPC 67 | { 68 | get 69 | { 70 | return Settings.Types.Contains(RayType.VLESS_gRPC); 71 | } 72 | } 73 | 74 | public bool Checked_VMESS_TCP 75 | { 76 | get 77 | { 78 | return Settings.Types.Contains(RayType.VMESS_TCP); 79 | } 80 | } 81 | 82 | public bool Checked_VMESS_WS 83 | { 84 | get 85 | { 86 | return Settings.Types.Contains(RayType.VMESS_WS); 87 | } 88 | } 89 | 90 | public bool Checked_VMESS_KCP 91 | { 92 | get 93 | { 94 | return Settings.Types.Contains(RayType.VMESS_KCP); 95 | } 96 | } 97 | 98 | public bool Checked_VMESS_QUIC 99 | { 100 | get 101 | { 102 | return Settings.Types.Contains(RayType.VMESS_QUIC); 103 | } 104 | } 105 | 106 | public bool Checked_Trojan_TCP 107 | { 108 | get 109 | { 110 | return Settings.Types.Contains(RayType.Trojan_TCP); 111 | } 112 | } 113 | 114 | public bool CheckedShadowSocks 115 | { 116 | get 117 | { 118 | return Settings.Types.Contains(RayType.ShadowsocksAEAD); 119 | } 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ProxySuper.Core/ViewModels/XrayInstallViewModel.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Commands; 2 | using MvvmCross.ViewModels; 3 | using ProxySuper.Core.Models; 4 | using ProxySuper.Core.Models.Hosts; 5 | using ProxySuper.Core.Models.Projects; 6 | using ProxySuper.Core.Services; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace ProxySuper.Core.ViewModels 15 | { 16 | public class XrayInstallViewModel : MvxViewModel 17 | { 18 | Host _host; 19 | 20 | XraySettings _settings; 21 | 22 | XrayService _xrayService; 23 | 24 | public override void ViewDestroy(bool viewFinishing = true) 25 | { 26 | _xrayService.Disconnect(); 27 | this.SaveInstallLog(); 28 | base.ViewDestroy(viewFinishing); 29 | } 30 | 31 | public override void Prepare(Record parameter) 32 | { 33 | this._host = parameter.Host; 34 | this._settings = parameter.XraySettings; 35 | } 36 | 37 | public override Task Initialize() 38 | { 39 | _xrayService = new XrayService(_host, _settings); 40 | _xrayService.Progress.StepUpdate = () => RaisePropertyChanged("Progress"); 41 | _xrayService.Progress.LogsUpdate = () => RaisePropertyChanged("Logs"); 42 | _xrayService.Connect(); 43 | 44 | return base.Initialize(); 45 | } 46 | 47 | public ProjectProgress Progress 48 | { 49 | get => _xrayService.Progress; 50 | } 51 | 52 | public string Logs 53 | { 54 | get => _xrayService.Progress.Logs; 55 | } 56 | 57 | 58 | 59 | #region Command 60 | 61 | public IMvxCommand InstallCommand => new MvxCommand(_xrayService.Install); 62 | 63 | public IMvxCommand UpdateSettingsCommand => new MvxCommand(_xrayService.UpdateSettings); 64 | 65 | public IMvxCommand UpdateXrayCoreCommand => new MvxCommand(_xrayService.UpdateXrayCore); 66 | 67 | public IMvxCommand UninstallCommand => new MvxCommand(_xrayService.Uninstall); 68 | 69 | public IMvxCommand UploadCertCommand => new MvxCommand(_xrayService.UploadCert); 70 | 71 | public IMvxCommand UploadWebCommand => new MvxCommand(_xrayService.UploadWeb); 72 | 73 | public IMvxCommand ApplyForCertCommand => new MvxCommand(_xrayService.ApplyForCert); 74 | 75 | #endregion 76 | 77 | private void SaveInstallLog() 78 | { 79 | if (!Directory.Exists("Logs")) 80 | { 81 | Directory.CreateDirectory("Logs"); 82 | } 83 | 84 | var fileName = Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".xary.txt"); 85 | File.WriteAllText(fileName, Logs); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ProxySuper.Core/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ProxySuper.Core/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ProxySuper.WPF/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ProxySuper.WPF/App.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /ProxySuper.WPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Core; 2 | using MvvmCross.Platforms.Wpf.Core; 3 | using MvvmCross.Platforms.Wpf.Views; 4 | 5 | namespace ProxySuper.WPF 6 | { 7 | /// 8 | /// App.xaml 的交互逻辑 9 | /// 10 | public partial class App : MvxApplication 11 | { 12 | protected override void RegisterSetup() 13 | { 14 | this.RegisterSetupType(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/HostControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// HostControl.xaml 的交互逻辑 7 | /// 8 | public partial class HostControl : UserControl 9 | { 10 | public HostControl() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/ProgressControl.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 28 | 29 | 30 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/ProgressControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.ViewModels; 2 | using ProxySuper.Core.Models; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Data; 11 | using System.Windows.Documents; 12 | using System.Windows.Input; 13 | using System.Windows.Media; 14 | using System.Windows.Media.Imaging; 15 | using System.Windows.Navigation; 16 | using System.Windows.Shapes; 17 | 18 | namespace ProxySuper.WPF.Controls 19 | { 20 | /// 21 | /// ProgressControl.xaml 的交互逻辑 22 | /// 23 | public partial class ProgressControl : UserControl 24 | { 25 | public ProgressControl() 26 | { 27 | InitializeComponent(); 28 | 29 | LogsTextBox.TextChanged += LogsTextBox_TextChanged; 30 | } 31 | 32 | private void LogsTextBox_TextChanged(object sender, TextChangedEventArgs e) 33 | { 34 | LogsTextBox.ScrollToEnd(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/ShadowSocksControl.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/ShadowSocksControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// ShadowSocksClientInfoControl.xaml 的交互逻辑 7 | /// 8 | public partial class ShadowSocksControl : UserControl 9 | { 10 | public ShadowSocksControl() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/Trojan_TCP_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/Trojan_TCP_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// Trojan_TCP_Control.xaml 的交互逻辑 7 | /// 8 | public partial class Trojan_TCP_Control : UserControl 9 | { 10 | public Trojan_TCP_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/V2raySettingsControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace ProxySuper.WPF.Controls 17 | { 18 | /// 19 | /// V2raySettingsControl.xaml 的交互逻辑 20 | /// 21 | public partial class V2raySettingsControl : UserControl 22 | { 23 | public V2raySettingsControl() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_KCP_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_KCP_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VLESS_KCP_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VLESS_KCP_Control : UserControl 9 | { 10 | public VLESS_KCP_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 44 | 45 | 46 | 50 | 51 | 52 | 55 | 56 | 57 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace ProxySuper.WPF.Controls 17 | { 18 | /// 19 | /// VLESS_QUIC_Control.xaml 的交互逻辑 20 | /// 21 | public partial class VLESS_QUIC_Control : UserControl 22 | { 23 | public VLESS_QUIC_Control() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_TCP_TLS_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 | 60 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_TCP_TLS_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VLESS_TCP_TLS_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VLESS_TCP_TLS_Control : UserControl 9 | { 10 | public VLESS_TCP_TLS_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_WS_TLS_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 | 60 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_WS_TLS_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VLESS_WS_TLS_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VLESS_WS_TLS_Control : UserControl 9 | { 10 | public VLESS_WS_TLS_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VLESS_XTLS_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VLESS_XTLS_Control : UserControl 9 | { 10 | public VLESS_XTLS_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_gRPC_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 | 60 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VLESS_gRPC_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VLESS_gRPC_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VLESS_gRPC_Control : UserControl 9 | { 10 | public VLESS_gRPC_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_KCP_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_KCP_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VMESS_KCP_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VMESS_KCP_Control : UserControl 9 | { 10 | public VMESS_KCP_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 21 | 24 | 25 | 26 | 29 | 30 | 31 | 34 | 35 | 36 | 39 | 40 | 41 | 45 | 46 | 47 | 51 | 52 | 53 | 56 | 57 | 58 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace ProxySuper.WPF.Controls 17 | { 18 | /// 19 | /// VMESS_QUIC_Control.xaml 的交互逻辑 20 | /// 21 | public partial class VMESS_QUIC_Control : UserControl 22 | { 23 | public VMESS_QUIC_Control() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_TCP_TLS_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_TCP_TLS_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VMESS_TCP_TLS_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VMESS_TCP_TLS_Control : UserControl 9 | { 10 | public VMESS_TCP_TLS_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_WS_TLS_Control.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/VMESS_WS_TLS_Control.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// VMESS_WS_TLS_Control.xaml 的交互逻辑 7 | /// 8 | public partial class VMESS_WS_TLS_Control : UserControl 9 | { 10 | public VMESS_WS_TLS_Control() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Controls/XraySettingsControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ProxySuper.WPF.Controls 4 | { 5 | /// 6 | /// XraySettingsControl.xaml 的交互逻辑 7 | /// 8 | public partial class XraySettingsControl : UserControl 9 | { 10 | public XraySettingsControl() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Platforms.Wpf.Views; 2 | 3 | namespace ProxySuper.WPF 4 | { 5 | /// 6 | /// MainWindow.xaml 的交互逻辑 7 | /// 8 | public partial class MainWindow : MvxWindow 9 | { 10 | public MainWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using System.Windows; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("ProxySuper.WPF")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ProxySuper.WPF")] 13 | [assembly: AssemblyCopyright("Copyright © 2021")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | //若要开始生成可本地化的应用程序,请设置 23 | //.csproj 文件中的 CultureYouAreCodingWith 24 | //例如,如果您在源文件中使用的是美国英语, 25 | //使用的是美国英语,请将 设置为 en-US。 然后取消 26 | //对以下 NeutralResourceLanguage 特性的注释。 更新 27 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 28 | 29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 30 | 31 | 32 | [assembly: ThemeInfo( 33 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 34 | //(未在页面中找到资源时使用, 35 | //或应用程序资源字典中找到时使用) 36 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 37 | //(未在页面中找到资源时使用, 38 | //、应用程序或任何主题专用资源字典中找到时使用) 39 | )] 40 | 41 | 42 | // 程序集的版本信息由下列四个值组成: 43 | // 44 | // 主版本 45 | // 次版本 46 | // 生成号 47 | // 修订号 48 | // 49 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 50 | //通过使用 "*",如下所示: 51 | // [assembly: AssemblyVersion("1.0.*")] 52 | [assembly: AssemblyVersion("4.1.6.0")] 53 | [assembly: AssemblyFileVersion("4.1.6.0")] 54 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ProxySuper.WPF.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProxySuper.WPF.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性,对 51 | /// 使用此强类型资源类的所有资源查找执行重写。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ProxySuper.WPF.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ProxySuper.WPF/ProxySU.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XgHao/ProxySU/2089df4f1126ea15593153334c9f2be39d513aa6/ProxySuper.WPF/ProxySU.ico -------------------------------------------------------------------------------- /ProxySuper.WPF/Resources/ProxySU.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XgHao/ProxySU/2089df4f1126ea15593153334c9f2be39d513aa6/ProxySuper.WPF/Resources/ProxySU.ico -------------------------------------------------------------------------------- /ProxySuper.WPF/Setup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using MvvmCross.Platforms.Wpf.Core; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace ProxySuper.WPF 10 | { 11 | public class Setup : MvxWpfSetup 12 | { 13 | protected override ILoggerProvider CreateLogProvider() 14 | { 15 | return null; 16 | } 17 | 18 | protected override ILoggerFactory CreateLogFactory() 19 | { 20 | return null; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/NaiveProxy/caddy.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Caddy 3 | Documentation=https://caddyserver.com/docs/ 4 | After=network.target network-online.target 5 | Requires=network-online.target 6 | 7 | [Service] 8 | User=caddy 9 | Group=caddy 10 | ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile 11 | ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile 12 | TimeoutStopSec=5s 13 | LimitNOFILE=1048576 14 | LimitNPROC=512 15 | PrivateTmp=true 16 | ProtectSystem=full 17 | AmbientCapabilities=CAP_NET_BIND_SERVICE 18 | 19 | [Install] 20 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/NaiveProxy/naive_server.caddyfile: -------------------------------------------------------------------------------- 1 | :##port##, ##domain## 2 | route { 3 | forward_proxy { 4 | ##basicauth## 5 | hide_ip 6 | hide_via 7 | probe_resistance 8 | } 9 | #file_server { root /usr/share/caddy } 10 | } 11 | ##reverse_proxy## -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/trojan-go/base.caddyfile: -------------------------------------------------------------------------------- 1 | :##port## { 2 | root * /usr/share/caddy 3 | file_server 4 | ##reverse_proxy## 5 | } 6 | 7 | ##domain##:80 { 8 | redir https://##domain##{uri} 9 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/trojan-go/trojan-go.json: -------------------------------------------------------------------------------- 1 | { 2 | "log_level": 5, 3 | "run_type": "server", 4 | "local_addr": "0.0.0.0", 5 | "local_port": 443, 6 | "remote_addr": "127.0.0.1", 7 | "remote_port": 80, 8 | "password": [ 9 | "" 10 | ], 11 | "ssl": { 12 | "cert": "/usr/local/etc/trojan-go/ssl/trojan-go.crt", 13 | "key": "/usr/local/etc/trojan-go/ssl/trojan-go.key", 14 | "sni": "example.com" 15 | }, 16 | "websocket": { 17 | "enabled": false, 18 | "path": "/ws", 19 | "host": "example.com" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": {}, 3 | "api": {}, 4 | "dns": {}, 5 | "routing": {}, 6 | "policy": {}, 7 | "inbounds": [], 8 | "outbounds": [], 9 | "transport": {}, 10 | "stats": {}, 11 | "reverse": {} 12 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/caddy/base.caddyfile: -------------------------------------------------------------------------------- 1 | :##port## { 2 | root * /usr/share/caddy 3 | file_server 4 | ##reverse_proxy## 5 | } 6 | 7 | ##domain##:80 { 8 | redir https://##domain##{uri} 9 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/00_log/00_log.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": { 3 | "loglevel": "warning" 4 | } 5 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/01_api/01_api.json: -------------------------------------------------------------------------------- 1 | { 2 | "api": null 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/02_dns/02_dns.json: -------------------------------------------------------------------------------- 1 | { 2 | "dns": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/03_routing/03_routing.json: -------------------------------------------------------------------------------- 1 | { 2 | "routing": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/04_policy/04_policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "policy": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/05_inbounds/05_inbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [ 3 | { 4 | "protocol": "http", 5 | "port": 1081 6 | }, 7 | { 8 | "port": 1080, 9 | "protocol": "socks", 10 | "sniffing": { 11 | "enabled": true, 12 | "destOverride": [ 13 | "http", 14 | "tls" 15 | ] 16 | }, 17 | "settings": { 18 | "udp": true, 19 | "auth": "noauth" 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/06_outbounds/06_outbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [] 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/06_outbounds/VLESS_HTTP2_TLS.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [ 3 | { 4 | "protocol": "vless", 5 | "settings": { 6 | "vnext": [ 7 | { 8 | "address": "", 9 | "port": 443, 10 | "users": [ 11 | { 12 | "id": "", 13 | "encryption": "none" 14 | } 15 | ] 16 | } 17 | ] 18 | }, 19 | "streamSettings": { 20 | "network": "h2", 21 | "security": "tls", 22 | "httpSettings": { 23 | "host": [ 24 | "" 25 | ], 26 | "path": null 27 | } 28 | } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/06_outbounds/VLESS_TCP_TLS_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [ 3 | { 4 | "protocol": "vless", 5 | "settings": { 6 | "vnext": [ 7 | { 8 | "address": "", 9 | "port": 443, 10 | "users": [ 11 | { 12 | "id": "", 13 | "encryption": "none", 14 | "level": 0 15 | } 16 | ] 17 | } 18 | ] 19 | }, 20 | "streamSettings": { 21 | "network": "ws", 22 | "security": "tls", 23 | "tlsSettings": { 24 | "serverName": "" 25 | }, 26 | "wsSettings": { 27 | "path": "" 28 | } 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/07_transport/07_transport.json: -------------------------------------------------------------------------------- 1 | { 2 | "transport": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/08_stats/08_stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "stats": null 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/client/09_reverse/09_reverse.json: -------------------------------------------------------------------------------- 1 | { 2 | "reverse": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/00_log/00_log.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": { 3 | "access": "none", 4 | "loglevel": "none" 5 | } 6 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/01_api/01_api.json: -------------------------------------------------------------------------------- 1 | { 2 | "api": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/02_dns/02_dns.json: -------------------------------------------------------------------------------- 1 | { 2 | "dns": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/03_routing/03_routing.json: -------------------------------------------------------------------------------- 1 | { 2 | "routing": { 3 | "domainStrategy": "AsIs", 4 | "rules": [ 5 | { 6 | "type": "field", 7 | "ip": [ 8 | "geoip:private" 9 | ], 10 | "outboundTag": "block" 11 | } 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/04_policy/04_policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "policy": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/05_inbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [] 3 | } 4 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/Shadowsocks-AEAD.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 12345, 3 | "protocol": "shadowsocks", 4 | "settings": { 5 | "password": "", 6 | "method": "aes-128-gcm", 7 | "network": "tcp,udp" 8 | } 9 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/Trojan_TCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1310, 3 | "listen": "127.0.0.1", 4 | "protocol": "trojan", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "password": "" 9 | } 10 | ], 11 | "fallbacks": [ 12 | { 13 | "dest": 8080 14 | } 15 | ] 16 | }, 17 | "streamSettings": { 18 | "network": "tcp", 19 | "security": "none", 20 | "tcpSettings": { 21 | "acceptProxyProtocol": true 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/Trojan_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1320, 3 | "listen": "127.0.0.1", 4 | "protocol": "trojan", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "password": "" 9 | } 10 | ], 11 | "fallbacks": [ 12 | { 13 | "dest": 80 14 | } 15 | ] 16 | }, 17 | 18 | "streamSettings": { 19 | "network": "ws", 20 | "security": "none", 21 | "wsSettings": { 22 | "acceptProxyProtocol": true, 23 | "path": "/trojanws" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_HTTP2.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1234, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "decryption": "none", 7 | "clients": [ 8 | { 9 | "id": "" 10 | } 11 | ] 12 | }, 13 | "streamSettings": { 14 | "network": "h2", 15 | "httpSettings": { 16 | "path": "" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_KCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3456, 3 | "protocol": "vless", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ], 10 | "decryption": "none" 11 | }, 12 | "streamSettings": { 13 | "network": "mkcp", 14 | "kcpSettings": { 15 | "uplinkCapacity": 100, 16 | "downlinkCapacity": 100, 17 | "congestion": true, 18 | "header": { 19 | "type": "none" 20 | }, 21 | "seed": null 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_QUIC.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 2000, 3 | "protocol": "vless", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ], 10 | "decryption": "none" 11 | }, 12 | "streamSettings": { 13 | "network": "quic", 14 | "quicSettings": { 15 | "security": "none", 16 | "key": "", 17 | "header": { 18 | "type": "none" 19 | } 20 | }, 21 | "security": "tls", 22 | "tlsSettings": { 23 | "certificates": [ 24 | { 25 | "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", 26 | "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_TCP_TLS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 443, 3 | "protocol": "vless", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "", 8 | "level": 0 9 | } 10 | ], 11 | "decryption": "none", 12 | "fallbacks": [] 13 | }, 14 | "streamSettings": { 15 | "network": "tcp", 16 | "security": "tls", 17 | "tlsSettings": { 18 | "alpn": [ 19 | "http/1.1" 20 | ], 21 | "certificates": [ 22 | { 23 | "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", 24 | "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" 25 | } 26 | ] 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1234, 3 | "listen": "127.0.0.1", 4 | "protocol": "vless", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ], 11 | "decryption": "none" 12 | }, 13 | "streamSettings": { 14 | "network": "ws", 15 | "security": "none", 16 | "wsSettings": { 17 | "acceptProxyProtocol": true, 18 | "path": "/websocket" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_gRPC.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 2002, 3 | "listen": "0.0.0.0", 4 | "protocol": "vless", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ], 11 | "decryption": "none" 12 | }, 13 | "streamSettings": { 14 | "network": "gun", 15 | "security": "tls", 16 | "tlsSettings": { 17 | "serverName": "domain", 18 | "alpn": [ 19 | "h2" 20 | ], 21 | "certificates": [ 22 | { 23 | "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", 24 | "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" 25 | } 26 | ] 27 | }, 28 | "grpcSettings": { 29 | "serviceName": "service_name" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_HTTP2.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1234, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ] 11 | }, 12 | "streamSettings": { 13 | "network": "h2", 14 | "httpSettings": { 15 | "path": "" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_KCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3456, 3 | "protocol": "vmess", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ] 10 | }, 11 | "streamSettings": { 12 | "network": "mkcp", 13 | "kcpSettings": { 14 | "uplinkCapacity": 100, 15 | "downlinkCapacity": 100, 16 | "congestion": true, 17 | "header": { 18 | "type": "none" 19 | }, 20 | "seed": null 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_QUIC.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3000, 3 | "protocol": "vmess", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ], 10 | "decryption": "none" 11 | }, 12 | "streamSettings": { 13 | "network": "quic", 14 | "quicSettings": { 15 | "security": "none", 16 | "key": "", 17 | "header": { 18 | "type": "none" 19 | } 20 | }, 21 | "security": "tls", 22 | "tlsSettings": { 23 | "certificates": [ 24 | { 25 | "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt", 26 | "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key" 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_TCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 443, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ] 11 | }, 12 | "streamSettings": { 13 | "network": "tcp", 14 | "security": "none", 15 | "tcpSettings": { 16 | "acceptProxyProtocol": true, 17 | "header": { 18 | "type": "http", 19 | "request": { 20 | "path": [ 21 | "/vmesstcp" 22 | ] 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3456, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ] 11 | }, 12 | "streamSettings": { 13 | "network": "ws", 14 | "security": "none", 15 | "wsSettings": { 16 | "acceptProxyProtocol": true, 17 | "path": "/vmessws" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/06_outbounds/06_outbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [ 3 | { 4 | "protocol": "freedom", 5 | "tag": "direct" 6 | }, 7 | { 8 | "protocol": "blackhole", 9 | "tag": "block" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/07_transport/07_transport.json: -------------------------------------------------------------------------------- 1 | { 2 | "transport": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/08_stats/08_stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "stats": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/v2ray/server/09_reverse/09_reverse.json: -------------------------------------------------------------------------------- 1 | { 2 | "reverse": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": {}, 3 | "api": {}, 4 | "dns": {}, 5 | "routing": {}, 6 | "policy": {}, 7 | "inbounds": [], 8 | "outbounds": [], 9 | "transport": {}, 10 | "stats": {}, 11 | "reverse": {} 12 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/caddy/base.caddyfile: -------------------------------------------------------------------------------- 1 | :##port## { 2 | root * /usr/share/caddy 3 | file_server 4 | ##reverse_proxy## 5 | } 6 | 7 | ##domain##:80 { 8 | redir https://##domain##{uri} 9 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/00_log/00_log.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": { 3 | "loglevel": "warning" 4 | } 5 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/01_api/01_api.json: -------------------------------------------------------------------------------- 1 | { 2 | "api": null 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/02_dns/02_dns.json: -------------------------------------------------------------------------------- 1 | { 2 | "dns": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/03_routing/03_routing.json: -------------------------------------------------------------------------------- 1 | { 2 | "routing": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/04_policy/04_policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "policy": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/05_inbounds/05_inbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [ 3 | { 4 | "protocol": "http", 5 | "port": 1081 6 | }, 7 | { 8 | "port": 1080, 9 | "protocol": "socks", 10 | "sniffing": { 11 | "enabled": true, 12 | "destOverride": [ 13 | "http", 14 | "tls" 15 | ] 16 | }, 17 | "settings": { 18 | "udp": true, 19 | "auth": "noauth" 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/06_outbounds/06_outbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [] 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/06_outbounds/VLESS_HTTP2_TLS.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [ 3 | { 4 | "protocol": "vless", 5 | "settings": { 6 | "vnext": [ 7 | { 8 | "address": "", 9 | "port": 443, 10 | "users": [ 11 | { 12 | "id": "", 13 | "encryption": "none" 14 | } 15 | ] 16 | } 17 | ] 18 | }, 19 | "streamSettings": { 20 | "network": "h2", 21 | "security": "tls", 22 | "httpSettings": { 23 | "host": [ 24 | "" 25 | ], 26 | "path": null 27 | } 28 | } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/06_outbounds/VLESS_TCP_TLS_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [ 3 | { 4 | "protocol": "vless", 5 | "settings": { 6 | "vnext": [ 7 | { 8 | "address": "", 9 | "port": 443, 10 | "users": [ 11 | { 12 | "id": "", 13 | "encryption": "none", 14 | "level": 0 15 | } 16 | ] 17 | } 18 | ] 19 | }, 20 | "streamSettings": { 21 | "network": "ws", 22 | "security": "tls", 23 | "tlsSettings": { 24 | "serverName": "" 25 | }, 26 | "wsSettings": { 27 | "path": "" 28 | } 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/07_transport/07_transport.json: -------------------------------------------------------------------------------- 1 | { 2 | "transport": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/08_stats/08_stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "stats": null 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/client/09_reverse/09_reverse.json: -------------------------------------------------------------------------------- 1 | { 2 | "reverse": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/00_log/00_log.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": { 3 | "access": "none", 4 | "loglevel": "none" 5 | } 6 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/01_api/01_api.json: -------------------------------------------------------------------------------- 1 | { 2 | "api": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/02_dns/02_dns.json: -------------------------------------------------------------------------------- 1 | { 2 | "dns": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/03_routing/03_routing.json: -------------------------------------------------------------------------------- 1 | { 2 | "routing": { 3 | "domainStrategy": "AsIs", 4 | "rules": [ 5 | { 6 | "type": "field", 7 | "ip": [ 8 | "geoip:private" 9 | ], 10 | "outboundTag": "block" 11 | } 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/04_policy/04_policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "policy": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/05_inbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [] 3 | } 4 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/Shadowsocks-AEAD.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 12345, 3 | "protocol": "shadowsocks", 4 | "settings": { 5 | "password": "", 6 | "method": "aes-128-gcm", 7 | "network": "tcp,udp" 8 | } 9 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/Trojan_TCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1310, 3 | "listen": "127.0.0.1", 4 | "protocol": "trojan", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "password": "" 9 | } 10 | ], 11 | "fallbacks": [ 12 | { 13 | "dest": 8080 14 | } 15 | ] 16 | }, 17 | "streamSettings": { 18 | "network": "tcp", 19 | "security": "none", 20 | "tcpSettings": { 21 | "acceptProxyProtocol": true 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/Trojan_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1320, 3 | "listen": "127.0.0.1", 4 | "protocol": "trojan", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "password": "" 9 | } 10 | ], 11 | "fallbacks": [ 12 | { 13 | "dest": 80 14 | } 15 | ] 16 | }, 17 | 18 | "streamSettings": { 19 | "network": "ws", 20 | "security": "none", 21 | "wsSettings": { 22 | "acceptProxyProtocol": true, 23 | "path": "/trojanws" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_HTTP2.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1234, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "decryption": "none", 7 | "clients": [ 8 | { 9 | "id": "" 10 | } 11 | ] 12 | }, 13 | "streamSettings": { 14 | "network": "h2", 15 | "httpSettings": { 16 | "path": "" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_KCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3456, 3 | "protocol": "vless", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ], 10 | "decryption": "none" 11 | }, 12 | "streamSettings": { 13 | "network": "mkcp", 14 | "kcpSettings": { 15 | "uplinkCapacity": 100, 16 | "downlinkCapacity": 100, 17 | "congestion": true, 18 | "header": { 19 | "type": "none" 20 | }, 21 | "seed": null 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_QUIC.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 2000, 3 | "protocol": "vless", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ], 10 | "decryption": "none" 11 | }, 12 | "streamSettings": { 13 | "network": "quic", 14 | "quicSettings": { 15 | "security": "none", 16 | "key": "", 17 | "header": { 18 | "type": "none" 19 | } 20 | }, 21 | "security": "tls", 22 | "tlsSettings": { 23 | "certificates": [ 24 | { 25 | "certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt", 26 | "keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key" 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 443, 3 | "protocol": "vless", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "", 8 | "flow": "xtls-rprx-direct" 9 | } 10 | ], 11 | "decryption": "none", 12 | "fallbacks": [] 13 | }, 14 | "streamSettings": { 15 | "network": "tcp", 16 | "security": "xtls", 17 | "xtlsSettings": { 18 | "allowInsecure": false, 19 | "minVersion": "1.2", 20 | "alpn": [ 21 | "http/1.1" 22 | ], 23 | "certificates": [ 24 | { 25 | "certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt", 26 | "keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key" 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS_Vision.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 443, 3 | "protocol": "vless", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "", 8 | "flow": "xtls-rprx-vision" 9 | } 10 | ], 11 | "decryption": "none", 12 | "fallbacks": [] 13 | }, 14 | "streamSettings": { 15 | "network": "tcp", 16 | "security": "tls", 17 | "tlsSettings": { 18 | "allowInsecure": false, 19 | "minVersion": "1.2", 20 | "alpn": [ 21 | "http/1.1" 22 | ], 23 | "certificates": [ 24 | { 25 | "certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt", 26 | "keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key" 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1234, 3 | "listen": "127.0.0.1", 4 | "protocol": "vless", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ], 11 | "decryption": "none" 12 | }, 13 | "streamSettings": { 14 | "network": "ws", 15 | "security": "none", 16 | "wsSettings": { 17 | "acceptProxyProtocol": true, 18 | "path": "/websocket" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_gRPC.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 2002, 3 | "listen": "0.0.0.0", 4 | "protocol": "vless", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ], 11 | "decryption": "none" 12 | }, 13 | "streamSettings": { 14 | "network": "gun", 15 | "security": "tls", 16 | "tlsSettings": { 17 | "serverName": "domain", 18 | "alpn": [ 19 | "h2" 20 | ], 21 | "certificates": [ 22 | { 23 | "certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt", 24 | "keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key" 25 | } 26 | ] 27 | }, 28 | "grpcSettings": { 29 | "serviceName": "service_name" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_HTTP2.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1234, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ] 11 | }, 12 | "streamSettings": { 13 | "network": "h2", 14 | "httpSettings": { 15 | "path": "" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_KCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3456, 3 | "protocol": "vmess", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ] 10 | }, 11 | "streamSettings": { 12 | "network": "mkcp", 13 | "kcpSettings": { 14 | "uplinkCapacity": 100, 15 | "downlinkCapacity": 100, 16 | "congestion": true, 17 | "header": { 18 | "type": "none" 19 | }, 20 | "seed": null 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_QUIC.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3000, 3 | "protocol": "vmess", 4 | "settings": { 5 | "clients": [ 6 | { 7 | "id": "" 8 | } 9 | ], 10 | "decryption": "none" 11 | }, 12 | "streamSettings": { 13 | "network": "quic", 14 | "quicSettings": { 15 | "security": "none", 16 | "key": "", 17 | "header": { 18 | "type": "none" 19 | } 20 | }, 21 | "security": "tls", 22 | "tlsSettings": { 23 | "certificates": [ 24 | { 25 | "certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt", 26 | "keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key" 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_TCP.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 443, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ] 11 | }, 12 | "streamSettings": { 13 | "network": "tcp", 14 | "security": "none", 15 | "tcpSettings": { 16 | "acceptProxyProtocol": true, 17 | "header": { 18 | "type": "http", 19 | "request": { 20 | "path": [ 21 | "/vmesstcp" 22 | ] 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_WS.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3456, 3 | "listen": "127.0.0.1", 4 | "protocol": "vmess", 5 | "settings": { 6 | "clients": [ 7 | { 8 | "id": "" 9 | } 10 | ] 11 | }, 12 | "streamSettings": { 13 | "network": "ws", 14 | "security": "none", 15 | "wsSettings": { 16 | "acceptProxyProtocol": true, 17 | "path": "/vmessws" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/06_outbounds/06_outbounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "outbounds": [ 3 | { 4 | "protocol": "freedom", 5 | "tag": "direct" 6 | }, 7 | { 8 | "protocol": "blackhole", 9 | "tag": "block" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/07_transport/07_transport.json: -------------------------------------------------------------------------------- 1 | { 2 | "transport": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/08_stats/08_stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "stats": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Templates/xray/server/09_reverse/09_reverse.json: -------------------------------------------------------------------------------- 1 | { 2 | "reverse": {} 3 | } -------------------------------------------------------------------------------- /ProxySuper.WPF/Views/Brook/BrookConfigView.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 40 | 41 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Views/Brook/BrookConfigView.xaml.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Platforms.Wpf.Presenters.Attributes; 2 | using MvvmCross.Platforms.Wpf.Views; 3 | 4 | namespace ProxySuper.WPF.Views 5 | { 6 | [MvxWindowPresentation] 7 | public partial class BrookConfigView : MvxWindow 8 | { 9 | public BrookConfigView() 10 | { 11 | InitializeComponent(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Views/Brook/BrookEditorView.xaml.cs: -------------------------------------------------------------------------------- 1 | using MvvmCross.Platforms.Wpf.Presenters.Attributes; 2 | using MvvmCross.Platforms.Wpf.Views; 3 | 4 | namespace ProxySuper.WPF.Views 5 | { 6 | [MvxWindowPresentation] 7 | public partial class BrookEditorView : MvxWindow 8 | { 9 | public BrookEditorView() 10 | { 11 | InitializeComponent(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ProxySuper.WPF/Views/Brook/BrookInstallView.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 |