Add site contacts/FAQ and accept AWG 2.0 / naive pastes in Add config.
ImportSubscription no longer requires only http(s): paste awg://, AWG .conf/JSON, or naive links; subscription parser also reads hosted AWG and Clash wireguard/naive. Site lists support emails and FAQ; Store listing texts/tools updated. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/csv"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func main() {
|
||||
path := filepath.Join(`D:\vpn navi`, "store.csv")
|
||||
f, err := os.Open(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
r := csv.NewReader(f)
|
||||
r.FieldsPerRecord = -1
|
||||
r.LazyQuotes = true
|
||||
all, err := r.ReadAll()
|
||||
f.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
header := all[0]
|
||||
di, ei := 3, 4
|
||||
for i, h := range header {
|
||||
if h == "default" {
|
||||
di = i
|
||||
}
|
||||
if h == "en" {
|
||||
ei = i
|
||||
}
|
||||
}
|
||||
ru := "EvilFox 4.2 — удобный и понятный клиент для безопасного доступа в интернет.\n\nЧто нового для пользователей:\n• Современный интерфейс: вкладки Защита, Мои серверы, Настройки, Статистика, Помощь\n• Большая кнопка подключения и понятный статус защиты\n• Светлая тема по умолчанию и переключение на тёмную\n• Языки: русский и английский (RU | EN)\n• Флаги стран у серверов (корректно на Windows)\n• Серверы с одним IP объединяются в одну строку с доступными протоколами\n• Добавление конфигурации по URL\n• Режим прокси и полный режим защиты (TUN)\n• Kill Switch — защита от утечек при обрыве соединения\n• Автовыбор сервера с лучшим пингом\n• Статистика трафика и сессий\n• Политика конфиденциальности и условия использования в разделе Помощь\n• Адаптивное окно под любой экран и масштаб Windows"
|
||||
en := "EvilFox 4.2 — a clearer, more polished client for private internet access.\n\nWhat's new:\n• Modern UI: Protection, My servers, Settings, Statistics, Help\n• Large connect button and clear protection status\n• Light theme by default, with dark theme toggle\n• Russian and English languages (RU | EN)\n• Country flags for servers (rendered correctly on Windows)\n• Same-IP servers grouped into one row with available protocols\n• Add configuration via URL\n• Proxy mode and full protection mode (TUN)\n• Kill Switch — leak protection if the connection drops\n• Auto-select the lowest-ping server\n• Traffic and session statistics\n• Privacy Policy and Terms of Use in Help\n• Adaptive window sizing for any screen and Windows display scale"
|
||||
for i := 1; i < len(all); i++ {
|
||||
for len(all[i]) < len(header) {
|
||||
all[i] = append(all[i], "")
|
||||
}
|
||||
if all[i][0] == "ReleaseNotes" {
|
||||
all[i][di] = ru
|
||||
all[i][ei] = en
|
||||
}
|
||||
}
|
||||
out, err := os.Create(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
out.Write([]byte{0xEF, 0xBB, 0xBF})
|
||||
w := csv.NewWriter(out)
|
||||
if err := w.WriteAll(all); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
w.Flush()
|
||||
out.Close()
|
||||
_ = os.MkdirAll(`D:\vpn navi\dist\microsoft-store`, 0755)
|
||||
_ = os.WriteFile(`D:\vpn navi\dist\microsoft-store\WhatsNew.ru.txt`, []byte(ru+"\n"), 0644)
|
||||
_ = os.WriteFile(`D:\vpn navi\dist\microsoft-store\WhatsNew.en.txt`, []byte(en+"\n"), 0644)
|
||||
listing := `D:\vpn navi\dist\microsoft-store\listing\store.csv`
|
||||
if _, err := os.Stat(filepath.Dir(listing)); err == nil {
|
||||
data, _ := os.ReadFile(path)
|
||||
_ = os.WriteFile(listing, data, 0644)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user