Compare commits

..

1 Commits

Author SHA1 Message Date
Sijie.Sun
25ed41caf5 use correct config server url (#519) 2024-12-20 00:21:22 +08:00
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 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 }) => {

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: "配置文件路径,注意:如果设置了这个选项,其他所有选项都将被忽略"

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_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!(
.parse() "udp://config-server.easytier.cn:22020/{}",
.unwrap(), config_server_url_s
)
.parse()
.unwrap(),
}; };
let mut c_url = config_server_url.clone(); let mut c_url = config_server_url.clone();
@@ -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");
} }