mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
28 lines
781 B
C#
28 lines
781 B
C#
using System.IO;
|
|
using Netch.Controllers;
|
|
using Netch.Models;
|
|
using Netch.Servers.VMess.Utils;
|
|
|
|
namespace Netch.Servers.VLESS
|
|
{
|
|
public class VLESSController : Guard, IServerController
|
|
{
|
|
public override string Name { get; protected set; } = "VLESS";
|
|
public override string MainFile { get; protected set; } = "v2ray.exe";
|
|
|
|
public ushort? Socks5LocalPort { get; set; }
|
|
|
|
public string LocalAddress { get; set; }
|
|
|
|
public bool Start(in Server s,in Mode mode)
|
|
{
|
|
File.WriteAllText("data\\last.json", V2rayConfigUtils.GenerateClientConfig(s, mode));
|
|
return StartInstanceAuto("-config ..\\data\\last.json");
|
|
}
|
|
|
|
public override void Stop()
|
|
{
|
|
StopInstance();
|
|
}
|
|
}
|
|
} |