style: adjust frps files (#1820)

This commit is contained in:
Tank 2020-05-24 11:28:57 +08:00 committed by GitHub
parent 964a1bbf39
commit dfbf9c4542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

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

View File

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

View File

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