diff --git a/cmd/vpnapp/main_windows.go b/cmd/vpnapp/main_windows.go
index bee9592..256cd1a 100644
--- a/cmd/vpnapp/main_windows.go
+++ b/cmd/vpnapp/main_windows.go
@@ -54,6 +54,8 @@ type uiState struct {
Version string `json:"version"`
Update update.Status `json:"update"`
Pings []netcheck.Result `json:"pings"`
+ Subscription string `json:"subscription_url"`
+ Hy2 core.Hy2Options `json:"hy2"`
}
func main() {
@@ -133,6 +135,8 @@ func main() {
mustBind(w, "pingServers", a.pingServers)
mustBind(w, "checkUpdate", a.checkUpdate)
mustBind(w, "applyUpdate", a.applyUpdate)
+ mustBind(w, "saveHy2", a.saveHy2)
+ mustBind(w, "importSubscription", a.importSubscription)
go a.autoCheckUpdate()
@@ -190,6 +194,8 @@ func (a *app) getState() (uiState, error) {
Version: update.CurrentVersion,
Update: a.updateStatus,
Pings: append([]netcheck.Result(nil), a.pings...),
+ Subscription: cfg.SubscriptionURL,
+ Hy2: a.mgr.ActiveHy2Options(),
}
if out.Protocol == "" {
if p, err := cfg.ActiveProfile(); err == nil {
@@ -274,6 +280,16 @@ func (a *app) installCore() (string, error) {
return strings.Join(parts, " | "), nil
}
+func (a *app) saveHy2(opts core.Hy2Options) error {
+ a.mu.Lock()
+ defer a.mu.Unlock()
+ return a.mgr.SaveHy2Options(opts)
+}
+
+func (a *app) importSubscription(rawURL string) (int, error) {
+ return a.mgr.ImportSubscription(rawURL)
+}
+
func (a *app) pingServers() ([]netcheck.Result, error) {
a.mu.Lock()
list := a.mgr.Profiles()
diff --git a/configs/config.example.json b/configs/config.example.json
index c0f8dd8..00ea099 100644
--- a/configs/config.example.json
+++ b/configs/config.example.json
@@ -2,6 +2,7 @@
"active": "naive-main",
"system_proxy": true,
"bin_dir": "bin",
+ "subscription_url": "",
"profiles": [
{
"name": "naive-main",
@@ -11,6 +12,20 @@
"socks://127.0.0.1:1080",
"http://127.0.0.1:1081"
]
+ },
+ {
+ "name": "hy2-example",
+ "protocol": "hysteria2",
+ "proxy": "",
+ "hy2_congestion": "bbr",
+ "hy2_bbr_profile": "standard",
+ "hy2_obfs": "salamander",
+ "hy2_obfs_password": "",
+ "hy2_sni": "",
+ "listen": [
+ "socks://127.0.0.1:1080",
+ "http://127.0.0.1:1081"
+ ]
}
]
}
diff --git a/dist/navis-release/Navis.exe b/dist/navis-release/Navis.exe
index 0e59f3f..9f5afb3 100644
Binary files a/dist/navis-release/Navis.exe and b/dist/navis-release/Navis.exe differ
diff --git a/dist/navis-release/update.json b/dist/navis-release/update.json
index 32845ae..1e2112d 100644
--- a/dist/navis-release/update.json
+++ b/dist/navis-release/update.json
@@ -1,10 +1,10 @@
{
- "version": "1.2.0",
- "notes": "Hysteria 2 + NaiveProxy, профили, пинг, автообновление (Windows amd64)",
+ "version": "1.3.0",
+ "notes": "Hysteria 2: BBR/Brutal, Salamander/Gecko, SNI-маскировка; URL подписки для импорта профилей",
"platform": "windows-amd64",
"os": "windows",
"arch": "amd64",
"url": "https://git.evilfox.cc/test2/navi/raw/branch/main/dist/navis-release/Navis.exe",
- "sha256": "6be0f649b89e8e2fca8e9ee1231694e1c081b3d70c1cad74acce4d9514c8fa25",
+ "sha256": "9dabde753f85c7dab9574582fc9e28e45e2aed26646f068c9e7057872063c063",
"mandatory": false
-}
\ No newline at end of file
+}
diff --git a/dist/update.json b/dist/update.json
index 32845ae..1e2112d 100644
--- a/dist/update.json
+++ b/dist/update.json
@@ -1,10 +1,10 @@
{
- "version": "1.2.0",
- "notes": "Hysteria 2 + NaiveProxy, профили, пинг, автообновление (Windows amd64)",
+ "version": "1.3.0",
+ "notes": "Hysteria 2: BBR/Brutal, Salamander/Gecko, SNI-маскировка; URL подписки для импорта профилей",
"platform": "windows-amd64",
"os": "windows",
"arch": "amd64",
"url": "https://git.evilfox.cc/test2/navi/raw/branch/main/dist/navis-release/Navis.exe",
- "sha256": "6be0f649b89e8e2fca8e9ee1231694e1c081b3d70c1cad74acce4d9514c8fa25",
+ "sha256": "9dabde753f85c7dab9574582fc9e28e45e2aed26646f068c9e7057872063c063",
"mandatory": false
-}
\ No newline at end of file
+}
diff --git a/internal/appui/index.html b/internal/appui/index.html
index c9fc075..b44cd91 100644
--- a/internal/appui/index.html
+++ b/internal/appui/index.html
@@ -112,6 +112,32 @@
.stack { display: grid; gap: 10px; margin-bottom: 14px; }
+ details.hy2 {
+ margin-bottom: 14px;
+ border: 1px solid var(--line);
+ border-radius: 16px;
+ padding: 10px 12px;
+ background: rgba(255,255,255,.55);
+ }
+ details.hy2 summary {
+ cursor: pointer;
+ font-weight: 700;
+ font-size: .84rem;
+ color: var(--accent);
+ list-style: none;
+ }
+ details.hy2 .grid2 {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 8px;
+ margin-top: 10px;
+ }
+ details.hy2 label.field { margin-top: 6px; }
+ .check {
+ display: flex; align-items: center; gap: 8px;
+ font-size: .88rem; margin-top: 8px;
+ }
+
.row {
display: flex; align-items: center; justify-content: space-between;
gap: 12px; padding: 12px 14px;
@@ -299,8 +325,71 @@
+
+
+
+
+
+
+
+
+ Hysteria 2 · BBR / Salamander / маскировка
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Системный прокси Windows