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

View File

@@ -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 apiHostSuggestions = ref<Array<string>>([])
const apiHostSearch = async (event: { query: string }) => {

View File

@@ -5,11 +5,11 @@ core_clap:
en: |+
config server address, allow format:
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: |+
配置服务器地址。允许格式:
完整URL--config-server udp://127.0.0.1:22020/admin
仅用户名:--config-server admin
仅用户名:--config-server admin,将使用官方的服务器
config_file:
en: "path to the config file, NOTE: if this is set, all other options will be ignored"
zh-CN: "配置文件路径,注意:如果设置了这个选项,其他所有选项都将被忽略"

View File

@@ -783,9 +783,12 @@ async fn run_main(cli: Cli) -> anyhow::Result<()> {
let config_server_url_s = cli.config_server.clone().unwrap();
let config_server_url = match url::Url::parse(&config_server_url_s) {
Ok(u) => u,
Err(_) => format!("udp://easytier.cn:22020/{}", config_server_url_s)
.parse()
.unwrap(),
Err(_) => format!(
"udp://config-server.easytier.cn:22020/{}",
config_server_url_s
)
.parse()
.unwrap(),
};
let mut c_url = config_server_url.clone();
@@ -801,6 +804,8 @@ async fn run_main(cli: Cli) -> anyhow::Result<()> {
c_url, token,
);
println!("Official config website: https://easytier.cn/web");
if token.is_empty() {
panic!("empty token");
}