Release 1.9.0: add VLESS, VMess and Trojan via Xray-core.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"vpnclient/internal/protocols/awg"
|
||||
"vpnclient/internal/protocols/hysteria2"
|
||||
"vpnclient/internal/protocols/naive"
|
||||
"vpnclient/internal/protocols/xray"
|
||||
"vpnclient/internal/update"
|
||||
)
|
||||
|
||||
@@ -176,6 +177,10 @@ func (a *app) getState() (uiState, error) {
|
||||
if path, err := awg.ResolveBinary(a.mgr.BinDir()); err == nil {
|
||||
corePath, coreReady = path, true
|
||||
}
|
||||
case config.ProtocolVLESS, config.ProtocolVMess, config.ProtocolTrojan:
|
||||
if path, err := xray.ResolveBinary(a.mgr.BinDir()); err == nil {
|
||||
corePath, coreReady = path, true
|
||||
}
|
||||
default:
|
||||
if path, err := naive.ResolveBinary(a.mgr.BinDir()); err == nil {
|
||||
corePath, coreReady = path, true
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
"vpnclient/internal/core"
|
||||
"vpnclient/internal/protocols/hysteria2"
|
||||
"vpnclient/internal/protocols/naive"
|
||||
"vpnclient/internal/protocols/xray"
|
||||
"vpnclient/internal/update"
|
||||
)
|
||||
|
||||
@@ -58,7 +59,7 @@ func main() {
|
||||
}
|
||||
|
||||
func printUsage() {
|
||||
fmt.Fprintf(os.Stderr, `Navis VPN client (NaiveProxy + Hysteria 2) — Windows / macOS
|
||||
fmt.Fprintf(os.Stderr, `Navis VPN client (Naive / Hy2 / AWG / VLESS / VMess / Trojan) — Windows / macOS
|
||||
|
||||
Usage:
|
||||
navis init [-config configs/config.json]
|
||||
@@ -69,7 +70,7 @@ Usage:
|
||||
navis check-update
|
||||
navis apply-update
|
||||
|
||||
Share links: naive+https://… hysteria2://… hy2://…
|
||||
Share links: naive+https://… hysteria2://… vless://… vmess://… trojan://… awg .conf
|
||||
|
||||
On macOS system proxy uses networksetup (HTTP + SOCKS). Local listens:
|
||||
socks://127.0.0.1:1080 http://127.0.0.1:1081
|
||||
@@ -128,6 +129,12 @@ func runInstallCore(args []string) int {
|
||||
return 1
|
||||
}
|
||||
fmt.Printf("hysteria2 core ready: %s\n", pathHy2)
|
||||
pathXray, err := xray.EnsureBinary(binDir)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "install-core xray: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
fmt.Printf("xray core ready: %s\n", pathXray)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user