From 1f4340e82ff9d1d0ded00b27c5cc806b2cc42503 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 11 Mar 2025 22:30:39 +0800 Subject: [PATCH] add configurable items for web/gui enable_exit_node relay_all_peer_rpc multi_thread proxy_forward_by_system relay_network_whitelist manual_routes exit_nodes --- .../frontend-lib/src/components/Config.vue | 98 +++++++++-- .../frontend-lib/src/components/Status.vue | 158 +++++++++--------- easytier-web/frontend-lib/src/locales/cn.yaml | 26 +++ easytier-web/frontend-lib/src/locales/en.yaml | 27 +++ easytier-web/frontend-lib/src/style.css | 4 + .../frontend-lib/src/types/network.ts | 21 +++ .../frontend/src/components/DeviceList.vue | 2 +- .../src/components/DeviceManagement.vue | 5 +- easytier/src/launcher.rs | 48 ++++++ easytier/src/proto/web.proto | 10 ++ 10 files changed, 303 insertions(+), 96 deletions(-) diff --git a/easytier-web/frontend-lib/src/components/Config.vue b/easytier-web/frontend-lib/src/components/Config.vue index 1dc14a3..ca42e31 100644 --- a/easytier-web/frontend-lib/src/components/Config.vue +++ b/easytier-web/frontend-lib/src/components/Config.vue @@ -120,6 +120,23 @@ function searchListenerSuggestions(e: { query: string }) { listenerSuggestions.value = ret } + +const exitNodesSuggestions = ref(['']) + +function searchExitNodesSuggestions(e: { query: string }) { + const ret = [] + ret.push(e.query) + exitNodesSuggestions.value = ret +} + +const whitelistSuggestions = ref(['']) + +function searchWhitelistSuggestions(e: { query: string }) { + const ret = [] + ret.push(e.query) + whitelistSuggestions.value = ret +} + interface BoolFlag { field: keyof NetworkConfig help: string @@ -133,6 +150,10 @@ const bool_flags: BoolFlag[] = [ { field: 'disable_p2p', help: 'disable_p2p_help' }, { field: 'bind_device', help: 'bind_device_help' }, { field: 'no_tun', help: 'no_tun_help' }, + { field: 'enable_exit_node', help: 'enable_exit_node_help' }, + { field: 'relay_all_peer_rpc', help: 'relay_all_peer_rpc_help' }, + { field: 'multi_thread', help: 'multi_thread_help' }, + { field: 'proxy_forward_by_system', help: 'proxy_forward_by_system_help' }, ] @@ -209,7 +230,7 @@ const bool_flags: BoolFlag[] = [
-
+
@@ -242,17 +263,20 @@ const bool_flags: BoolFlag[] = [
-
- - - - /{{ curNetwork.vpn_portal_client_network_len }} - - - - +
+
+ + + + /{{ curNetwork.vpn_portal_client_network_len }} + + +
+
+ +
@@ -283,6 +307,56 @@ const bool_flags: BoolFlag[] = [ :placeholder="t('dev_name_placeholder')" />
+ +
+
+
+ + +
+ +
+
+ +
+
+
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+
+ +
+
+
+ + +
+ +
+
+
diff --git a/easytier-web/frontend-lib/src/components/Status.vue b/easytier-web/frontend-lib/src/components/Status.vue index 2ac54dd..ccf017b 100644 --- a/easytier-web/frontend-lib/src/components/Status.vue +++ b/easytier-web/frontend-lib/src/components/Status.vue @@ -5,7 +5,7 @@ import { NetworkInstance, type NodeInfo, type PeerRoutePair } from '../types/net import { useI18n } from 'vue-i18n'; import { computed, onMounted, onUnmounted, ref } from 'vue'; import { ipv4InetToString, ipv4ToString, ipv6ToString } from '../modules/utils'; -import { DataTable, Column, Tag, Chip, Button, Dialog, ScrollPanel, Timeline, Divider, Card, } from 'primevue'; +import { DataTable, Column, Tag, Chip, Button, Dialog, ScrollPanel, Timeline, Divider, Panel, } from 'primevue'; const props = defineProps<{ curNetworkInst: NetworkInstance | null, @@ -318,107 +318,101 @@ function showEventLogs() { - -