use correct config server url (#519)

This commit is contained in:
Sijie.Sun
2024-12-20 00:21:22 +08:00
committed by GitHub
parent 4bb72b5606
commit 25ed41caf5
3 changed files with 11 additions and 6 deletions
@@ -47,7 +47,7 @@ const onRegister = async () => {
} }
}; };
const defaultApiHost = 'http://easytier.cn:11211' const defaultApiHost = 'https://config-server.easytier.cn'
const apiHost = ref<string>(defaultApiHost) const apiHost = ref<string>(defaultApiHost)
const apiHostSuggestions = ref<Array<string>>([]) const apiHostSuggestions = ref<Array<string>>([])
const apiHostSearch = async (event: { query: string }) => { const apiHostSearch = async (event: { query: string }) => {
+2 -2
View File
@@ -5,11 +5,11 @@ core_clap:
en: |+ en: |+
config server address, allow format: config server address, allow format:
full url: --config-server udp://127.0.0.1:22020/admin full url: --config-server udp://127.0.0.1:22020/admin
only user name: --config-server admin only user name: --config-server admin, will use official server
zh-CN: |+ zh-CN: |+
配置服务器地址。允许格式: 配置服务器地址。允许格式:
完整URL--config-server udp://127.0.0.1:22020/admin 完整URL--config-server udp://127.0.0.1:22020/admin
仅用户名:--config-server admin 仅用户名:--config-server admin,将使用官方的服务器
config_file: config_file:
en: "path to the config file, NOTE: if this is set, all other options will be ignored" en: "path to the config file, NOTE: if this is set, all other options will be ignored"
zh-CN: "配置文件路径,注意:如果设置了这个选项,其他所有选项都将被忽略" zh-CN: "配置文件路径,注意:如果设置了这个选项,其他所有选项都将被忽略"
+6 -1
View File
@@ -783,7 +783,10 @@ async fn run_main(cli: Cli) -> anyhow::Result<()> {
let config_server_url_s = cli.config_server.clone().unwrap(); let config_server_url_s = cli.config_server.clone().unwrap();
let config_server_url = match url::Url::parse(&config_server_url_s) { let config_server_url = match url::Url::parse(&config_server_url_s) {
Ok(u) => u, Ok(u) => u,
Err(_) => format!("udp://easytier.cn:22020/{}", config_server_url_s) Err(_) => format!(
"udp://config-server.easytier.cn:22020/{}",
config_server_url_s
)
.parse() .parse()
.unwrap(), .unwrap(),
}; };
@@ -801,6 +804,8 @@ async fn run_main(cli: Cli) -> anyhow::Result<()> {
c_url, token, c_url, token,
); );
println!("Official config website: https://easytier.cn/web");
if token.is_empty() { if token.is_empty() {
panic!("empty token"); panic!("empty token");
} }