mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 12:47:25 +08:00
add options to gui to enable kcp (#583)
* add test to kcp * add options to gui to enable kcp
This commit is contained in:
@@ -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' },
|
||||
]
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -188,11 +203,18 @@ function searchListenerSuggestions(e: { query: string }) {
|
||||
|
||||
<Panel :header="t('advanced_settings')" toggleable collapsed>
|
||||
<div class="flex flex-col gap-y-2">
|
||||
|
||||
<div class="flex flex-row gap-x-9 flex-wrap">
|
||||
<div class="flex flex-col gap-2 basis-5/12 grow">
|
||||
<div class="flex items-center">
|
||||
<Checkbox v-model="curNetwork.latency_first" input-id="use_latency_first" :binary="true" />
|
||||
<label for="use_latency_first" class="ml-2"> {{ t('use_latency_first') }} </label>
|
||||
<label> {{ t('flags_switch') }} </label>
|
||||
<div class="flex flex-row flex-wrap">
|
||||
|
||||
<div class="basis-64 flex" v-for="flag in bool_flags">
|
||||
<Checkbox v-model="curNetwork[flag.field]" :input-id="flag.field" :binary="true" />
|
||||
<label :for="flag.field" class="ml-2"> {{ t(flag.field) }} </label>
|
||||
<span class="pi pi-question-circle ml-2 self-center" v-tooltip="t(flag.help)"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -69,6 +69,29 @@ upload_bytes: 上传
|
||||
download_bytes: 下载
|
||||
loss_rate: 丢包率
|
||||
|
||||
flags_switch: 功能开关
|
||||
|
||||
latency_first: 开启延迟优先模式
|
||||
latency_first_help: 忽略中转跳数,选择总延迟最低的路径
|
||||
|
||||
use_smoltcp: 使用用户态协议栈
|
||||
use_smoltcp_help: 使用用户态 TCP/IP 协议栈,避免操作系统防火墙问题导致无法子网代理。
|
||||
|
||||
enable_kcp_proxy: 启用 KCP 代理
|
||||
enable_kcp_proxy_help: 将 TCP 流量转为 KCP 流量,降低传输延迟,提升传输速度。
|
||||
|
||||
disable_kcp_input: 禁用 KCP 输入
|
||||
disable_kcp_input_help: 禁用 KCP 入站流量,其他开启 KCP 代理的节点无法连接到本节点。
|
||||
|
||||
disable_p2p: 禁用 P2P
|
||||
disable_p2p_help: 禁用 P2P 模式,所有流量通过手动指定的服务器中转。
|
||||
|
||||
bind_device: 仅使用物理网卡
|
||||
bind_device_help: 仅使用物理网卡,避免 EasyTier 通过其他虚拟网建立连接。
|
||||
|
||||
no_tun: 无 TUN 模式
|
||||
no_tun_help: 不使用 TUN 网卡,适合无管理员权限时使用。本节点仅允许被访问。访问其他节点需要使用 SOCK5
|
||||
|
||||
status:
|
||||
version: 内核版本
|
||||
local: 本机
|
||||
@@ -113,3 +136,4 @@ event:
|
||||
VpnPortalClientDisconnected: VPN门户客户端已断开连接
|
||||
DhcpIpv4Changed: DHCP IPv4地址更改
|
||||
DhcpIpv4Conflicted: DHCP IPv4地址冲突
|
||||
|
||||
|
||||
@@ -35,6 +35,13 @@ export interface NetworkConfig {
|
||||
latency_first: boolean
|
||||
|
||||
dev_name: string
|
||||
|
||||
use_smoltcp?: boolean
|
||||
enable_kcp_proxy?: boolean
|
||||
disable_kcp_input?: boolean
|
||||
disable_p2p?: boolean
|
||||
bind_device?: boolean
|
||||
no_tun?: boolean
|
||||
}
|
||||
|
||||
export function DEFAULT_NETWORK_CONFIG(): NetworkConfig {
|
||||
@@ -67,8 +74,15 @@ export function DEFAULT_NETWORK_CONFIG(): NetworkConfig {
|
||||
'wg://0.0.0.0:11011',
|
||||
],
|
||||
rpc_port: 0,
|
||||
latency_first: true,
|
||||
latency_first: false,
|
||||
dev_name: '',
|
||||
|
||||
use_smoltcp: false,
|
||||
enable_kcp_proxy: false,
|
||||
disable_kcp_input: false,
|
||||
disable_p2p: false,
|
||||
bind_device: true,
|
||||
no_tun: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user