add docker login basic auth support

This commit is contained in:
wjqserver 2025-06-17 14:45:14 +08:00
parent 37488db087
commit eb113b4191
7 changed files with 44 additions and 8 deletions

View file

@ -169,10 +169,16 @@ type OutboundConfig struct {
[docker]
enabled = false
target = "ghcr" # ghcr/dockerhub
auth = false
[docker.credentials]
user1 = "testpass"
test = "test123"
*/
type DockerConfig struct {
Enabled bool `toml:"enabled"`
Target string `toml:"target"`
Enabled bool `toml:"enabled"`
Target string `toml:"target"`
Auth bool `toml:"auth"`
Credentials map[string]string `toml:"credentials"`
}
// LoadConfig 从 TOML 配置文件加载配置

View file

@ -67,4 +67,8 @@ url = "socks5://127.0.0.1:1080" # "http://127.0.0.1:7890"
[docker]
enabled = false
target = "dockerhub" # ghcr/dockerhub/ custom
target = "dockerhub" # ghcr/dockerhub/ custom
auth = false
[docker.credentials]
user1 = "testpass"
test = "test123"