mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-26 11:01:07 +01:00
added load balance support and verbose level
This commit is contained in:
22
src/go-proxy/proxy_config.go
Normal file
22
src/go-proxy/proxy_config.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type ProxyConfig struct {
|
||||
id string
|
||||
Alias string
|
||||
Scheme string
|
||||
Host string
|
||||
Port string
|
||||
LoadBalance string
|
||||
Path string // http proxy only
|
||||
PathMode string // http proxy only
|
||||
}
|
||||
|
||||
func NewProxyConfig() ProxyConfig {
|
||||
return ProxyConfig{}
|
||||
}
|
||||
|
||||
func (cfg *ProxyConfig) UpdateId() {
|
||||
cfg.id = fmt.Sprintf("%s-%s-%s-%s-%s", cfg.Alias, cfg.Scheme, cfg.Host, cfg.Port, cfg.Path)
|
||||
}
|
||||
Reference in New Issue
Block a user