mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
feat(watcher): add support for proxy_url in auth metadata
- Extracted and assigned `proxy_url` from metadata to `Auth.ProxyURL`.
This commit is contained in:
@@ -951,6 +951,11 @@ func (w *Watcher) SnapshotCoreAuths() []*coreauth.Auth {
|
|||||||
id = rel
|
id = rel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proxyURL := ""
|
||||||
|
if p, ok := metadata["proxy_url"].(string); ok {
|
||||||
|
proxyURL = p
|
||||||
|
}
|
||||||
|
|
||||||
a := &coreauth.Auth{
|
a := &coreauth.Auth{
|
||||||
ID: id,
|
ID: id,
|
||||||
Provider: provider,
|
Provider: provider,
|
||||||
@@ -960,6 +965,7 @@ func (w *Watcher) SnapshotCoreAuths() []*coreauth.Auth {
|
|||||||
"source": full,
|
"source": full,
|
||||||
"path": full,
|
"path": full,
|
||||||
},
|
},
|
||||||
|
ProxyURL: proxyURL,
|
||||||
Metadata: metadata,
|
Metadata: metadata,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
|
|||||||
Reference in New Issue
Block a user