1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-12-01 09:36:06 +03:00
ProxySU/ProxySuper.Core/ViewModels/HysteriaConfigViewModel.cs

46 lines
1.2 KiB
C#
Raw Normal View History

2023-04-01 06:29:01 +03:00
using MvvmCross.ViewModels;
using Newtonsoft.Json;
using ProxySuper.Core.Models.Projects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProxySuper.Core.ViewModels
{
public class HysteriaConfigViewModel : MvxViewModel<HysteriaSettings>
{
public HysteriaSettings Settings { get; set; }
public override void Prepare(HysteriaSettings parameter)
{
Settings = parameter;
}
public string ClientJson {
get
{
var jsonData = new
{
server = $"{Settings.Domain}:{Settings.Port}",
obfs = Settings.Obfs,
up_mbps = 10,
down_mbps = 50,
socks5 = new
{
listen = "127.0.0.1:1080"
},
http = new
{
listen = "127.0.0.1:1081"
}
};
return JsonConvert.SerializeObject(jsonData, Formatting.Indented);
}
}
}
}