1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package proxy
- import (
- "reflect"
- v1 "github.com/fatedier/frp/pkg/config/v1"
- )
- func init() {
- pxyConfs := []v1.ProxyConfigurer{
- &v1.TCPProxyConfig{},
- &v1.HTTPProxyConfig{},
- &v1.HTTPSProxyConfig{},
- &v1.STCPProxyConfig{},
- &v1.TCPMuxProxyConfig{},
- }
- for _, cfg := range pxyConfs {
- RegisterProxyFactory(reflect.TypeOf(cfg), NewGeneralTCPProxy)
- }
- }
- type GeneralTCPProxy struct {
- *BaseProxy
- }
- func NewGeneralTCPProxy(baseProxy *BaseProxy, _ v1.ProxyConfigurer) Proxy {
- return &GeneralTCPProxy{
- BaseProxy: baseProxy,
- }
- }
|