mirror of
https://github.com/fatedier/frp.git
synced 2025-07-23 14:20:43 +07:00
support yaml/json/toml configuration format, make ini deprecated (#3599)
This commit is contained in:
@ -18,22 +18,22 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/fatedier/frp/pkg/config"
|
||||
v1 "github.com/fatedier/frp/pkg/config/v1"
|
||||
"github.com/fatedier/frp/pkg/util/util"
|
||||
"github.com/fatedier/frp/pkg/util/vhost"
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterProxyFactory(reflect.TypeOf(&config.HTTPSProxyConf{}), NewHTTPSProxy)
|
||||
RegisterProxyFactory(reflect.TypeOf(&v1.HTTPSProxyConfig{}), NewHTTPSProxy)
|
||||
}
|
||||
|
||||
type HTTPSProxy struct {
|
||||
*BaseProxy
|
||||
cfg *config.HTTPSProxyConf
|
||||
cfg *v1.HTTPSProxyConfig
|
||||
}
|
||||
|
||||
func NewHTTPSProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy {
|
||||
unwrapped, ok := cfg.(*config.HTTPSProxyConf)
|
||||
func NewHTTPSProxy(baseProxy *BaseProxy) Proxy {
|
||||
unwrapped, ok := baseProxy.GetConfigurer().(*v1.HTTPSProxyConfig)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
@ -86,10 +86,6 @@ func (pxy *HTTPSProxy) Run() (remoteAddr string, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (pxy *HTTPSProxy) GetConf() config.ProxyConf {
|
||||
return pxy.cfg
|
||||
}
|
||||
|
||||
func (pxy *HTTPSProxy) Close() {
|
||||
pxy.BaseProxy.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user