Versions in this module Expand all Collapse all v0 v0.9.0 Nov 30, 2022 Changes in this version + func BatchRenderTestDownload(link string, concurrency int, fontPath string, pngPath string, language string, ...) error + func BatchTestDownload(link string, concurrency int, testDownload TestDownload) error + func BatchTestLatency(link string, concurrency int, testLatency TestLatency) + func BatchTestVmessCoreLatency(link string, concurrency int, testLatency TestLatency) + func CheckXVersion() string + func ParseClash(message string) (string, error) + func PeekClash(message string, n int) (string, error) + func QueryOutboundXStats(tag string, direct string) int64 + func Resolve(addr string, enableIPv6 bool, hostname string) (string, error) + func StartShadowsocksTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func StartV2RayLiteWithTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func StartXRay(packetFlow PacketFlow, vpnService VpnService, logService LogService, ...) error + func StartXRayWithTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func StartXShadowsocksTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func StartXTrojanTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func StartXVlessTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func TestLinkDownloadSpeed(link string, cb TestLatencyStop) (int64, error) + func TestVmessDownload(profile *Vmess, timeout time.Duration, cb TestLatency) (int64, error) + func TestVmessLatencyDirect(profile *Vmess) (int64, error) + type Shadowsocks features.Shadowsocks + func NewShadowSocks(Add string, Port int, Password string, Method string, opt []byte) *Shadowsocks + type TestDownload interface + UpdateSpeed func(id int, speed int64, elapse int64) + UpdateTraffic func(id int, traffic int64) + type TestLatency interface + UpdateLatency func(id int, elapsed int64) + type TestLatencyStop interface + UpdateLatency func(id int, elapsed int64) bool + type Vless features.Vless + func NewVless(Add string, Port int, ID string, TLS string, HeaderType string, ...) *Vless type Vmess + func NewLiteShadowSocks(Add string, Port int, ID string, Security string, opt []byte) *Vmess v0.8.0 Sep 27, 2020 Changes in this version + const TROJAN + const VLESS + const VMESS + func QueryOutboundStats(tag string, direct string) int64 + func StartTrojan(packetFlow PacketFlow, vpnService VpnService, logService LogService, ...) error + func StartTrojanTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func StartV2RayWithTunFd(tunFd int, vpnService VpnService, logService LogService, querySpeed QuerySpeed, ...) error + func TestTrojanLatency(trojan *Trojan) (int64, error) + type QuerySpeed interface + UpdateTraffic func(up int64, down int64) + type Trojan struct + Add string + Password string + Port int + SNI string + SkipCertVerify bool + func NewTrojan(Add string, Port int, Password string, SNI string, SkipCertVerify bool, ...) *Trojan type Vmess + Protocol protocol + Trojan *Trojan + type VmessOptions struct + AllowInsecure bool + DNS string + EnableSniffing bool + Loglevel string + RouteMode int + UseIPv6 bool v0.7.0 Jul 12, 2020 Changes in this version + const AddrTypeFQDN + const AddrTypeIPv4 + const AddrTypeIPv6 + const AuthMethodNotRequired + const SocksCmdConnect + const StatusSucceeded + const Version5 + func CheckVersion() string + func CopyAssets(assetDir string, force bool) error + func DecodeJSONConfig(reader io.Reader) (*conf.Config, error) + func GenerateVmessString(profile *Vmess) (string, error) + func GetFreePort() (int, error) + func InputPacket(data []byte) + func QueryStats(direct string) int64 + func SetLocalDNS(dns string) + func SetNonblock(fd int, nonblocking bool) bool + func StartV2Ray(packetFlow PacketFlow, vpnService VpnService, logService LogService, ...) error + func StartV2RayWithVmess(packetFlow PacketFlow, vpnService VpnService, logService LogService, ...) error + func StopV2Ray() + func TestConfig(ConfigureFileContent string, assetperfix string) error + func TestConfigLatency(configBytes []byte, assetPath string) (int64, error) + func TestTCPPing(host string, port int) (int64, error) + func TestURLLatency(url string) (int64, error) + func TestVmessLatency(profile *Vmess, assetPath string, port int) (int64, error) + type LogService interface + WriteLog func(s string) error + type PacketFlow interface + WritePacket func(packet []byte) + type Vmess struct + Add string + Aid int + DNS string + Host string + ID string + Loglevel string + Net string + Path string + Port int + RouteMode int + Security string + TLS string + Type string + UseIPv6 bool + func ConvertJSONToVmess(configBytes []byte) (*Vmess, error) + func NewVmess(Host string, Path string, TLS string, Add string, Port int, Aid int, ...) *Vmess + type VpnService interface + Protect func(fd int) bool v0.6.0 Apr 6, 2020 v0.5.0 Mar 16, 2020 v0.4.0 Feb 28, 2020 v0.3.0 Jan 19, 2020 v0.2.1 Jan 10, 2020 v0.2.0 Jan 6, 2020 v0.1.0 Jan 3, 2020