add tokenSource support for auth configuration (#4865)

This commit is contained in:
fatedier
2025-07-03 13:17:21 +08:00
committed by GitHub
parent 61330d4d79
commit f9065a6a78
20 changed files with 832 additions and 23 deletions

View File

@@ -51,7 +51,10 @@ var natholeDiscoveryCmd = &cobra.Command{
cfg, _, _, _, err := config.LoadClientConfig(cfgFile, strictConfigMode)
if err != nil {
cfg = &v1.ClientCommonConfig{}
cfg.Complete()
if err := cfg.Complete(); err != nil {
fmt.Printf("failed to complete config: %v\n", err)
os.Exit(1)
}
}
if natHoleSTUNServer != "" {
cfg.NatHoleSTUNServer = natHoleSTUNServer