From b69b122c8de1ffe979d69da51fc8074df8a4f0b9 Mon Sep 17 00:00:00 2001 From: "Sijie.Sun" Date: Sun, 26 Jan 2025 13:31:20 +0800 Subject: [PATCH] add options to gui to enable kcp (#583) * add test to kcp * add options to gui to enable kcp --- .../frontend-lib/src/components/Config.vue | 28 +++++++++++++++++-- easytier-web/frontend-lib/src/locales/cn.yaml | 24 ++++++++++++++++ .../frontend-lib/src/types/network.ts | 16 ++++++++++- easytier/src/common/config.rs | 2 +- easytier/src/launcher.rs | 25 +++++++++++++++++ easytier/src/proto/web.proto | 7 +++++ easytier/src/tests/three_node.rs | 7 +++++ 7 files changed, 104 insertions(+), 5 deletions(-) diff --git a/easytier-web/frontend-lib/src/components/Config.vue b/easytier-web/frontend-lib/src/components/Config.vue index 6f38c52..1dc14a3 100644 --- a/easytier-web/frontend-lib/src/components/Config.vue +++ b/easytier-web/frontend-lib/src/components/Config.vue @@ -120,6 +120,21 @@ function searchListenerSuggestions(e: { query: string }) { listenerSuggestions.value = ret } +interface BoolFlag { + field: keyof NetworkConfig + help: string +} + +const bool_flags: BoolFlag[] = [ + { field: 'latency_first', help: 'latency_first_help' }, + { field: 'use_smoltcp', help: 'use_smoltcp_help' }, + { field: 'enable_kcp_proxy', help: 'enable_kcp_proxy_help' }, + { field: 'disable_kcp_input', help: 'disable_kcp_input_help' }, + { field: 'disable_p2p', help: 'disable_p2p_help' }, + { field: 'bind_device', help: 'bind_device_help' }, + { field: 'no_tun', help: 'no_tun_help' }, +] +