Browse Source

style: adjust frps files (#1820)

pull/1821/head
Tank 5 years ago committed by GitHub
parent
commit
dfbf9c4542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      server/controller/resource.go
  2. 3
      server/service.go
  3. 2
      server/visitor/visitor.go

3
server/controller/resource.go

@ -19,6 +19,7 @@ import (
plugin "github.com/fatedier/frp/models/plugin/server"
"github.com/fatedier/frp/server/group"
"github.com/fatedier/frp/server/ports"
"github.com/fatedier/frp/server/visitor"
"github.com/fatedier/frp/utils/tcpmux"
"github.com/fatedier/frp/utils/vhost"
)
@ -26,7 +27,7 @@ import (
// All resource managers and controllers
type ResourceController struct {
// Manage all visitor listeners
VisitorManager *VisitorManager
VisitorManager *visitor.VisitorManager
// Tcp Group Controller
TcpGroupCtl *group.TcpGroupCtl

3
server/service.go

@ -41,6 +41,7 @@ import (
"github.com/fatedier/frp/server/metrics"
"github.com/fatedier/frp/server/ports"
"github.com/fatedier/frp/server/proxy"
"github.com/fatedier/frp/server/visitor"
"github.com/fatedier/frp/utils/log"
frpNet "github.com/fatedier/frp/utils/net"
"github.com/fatedier/frp/utils/tcpmux"
@ -104,7 +105,7 @@ func NewService(cfg config.ServerCommonConf) (svr *Service, err error) {
pxyManager: proxy.NewProxyManager(),
pluginManager: plugin.NewManager(),
rc: &controller.ResourceController{
VisitorManager: controller.NewVisitorManager(),
VisitorManager: visitor.NewVisitorManager(),
TcpPortManager: ports.NewPortManager("tcp", cfg.ProxyBindAddr, cfg.AllowPorts),
UdpPortManager: ports.NewPortManager("udp", cfg.ProxyBindAddr, cfg.AllowPorts),
},

2
server/controller/visitor.go → server/visitor/visitor.go

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package controller
package visitor
import (
"fmt"
Loading…
Cancel
Save