mirror of
https://github.com/fatedier/frp.git
synced 2025-04-24 16:51:27 +00:00
Compare commits
No commits in common. "1e8db667434f8f43cd60c16e9a6d694e9bd6e420" and "b8d3ace1139f5bcfee816d9844bba4780d052ba8" have entirely different histories.
1e8db66743
...
b8d3ace113
@ -1,7 +1,3 @@
|
||||
### Features
|
||||
|
||||
* Support metadatas and annotations in frpc proxy commands.
|
||||
|
||||
### Fixes
|
||||
|
||||
* Properly release resources in service.Close() to prevent resource leaks when used as a library.
|
||||
|
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.22.0
|
||||
require (
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
|
||||
github.com/coreos/go-oidc/v3 v3.10.0
|
||||
github.com/fatedier/golib v0.5.1
|
||||
github.com/fatedier/golib v0.5.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/gorilla/mux v1.8.1
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
|
4
go.sum
4
go.sum
@ -21,8 +21,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatedier/golib v0.5.1 h1:hcKAnaw5mdI/1KWRGejxR+i1Hn/NvbY5UsMKDr7o13M=
|
||||
github.com/fatedier/golib v0.5.1/go.mod h1:W6kIYkIFxHsTzbgqg5piCxIiDo4LzwgTY6R5W8l9NFQ=
|
||||
github.com/fatedier/golib v0.5.0 h1:hNcH7hgfIFqVWbP+YojCCAj4eO94pPf4dEF8lmq2jWs=
|
||||
github.com/fatedier/golib v0.5.0/go.mod h1:W6kIYkIFxHsTzbgqg5piCxIiDo4LzwgTY6R5W8l9NFQ=
|
||||
github.com/fatedier/yamux v0.0.0-20230628132301-7aca4898904d h1:ynk1ra0RUqDWQfvFi5KtMiSobkVQ3cNc0ODb8CfIETo=
|
||||
github.com/fatedier/yamux v0.0.0-20230628132301-7aca4898904d/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
||||
github.com/go-jose/go-jose/v4 v4.0.1 h1:QVEPDE3OluqXBQZDcnNvQrInro2h0e4eqNbnZSWqS6U=
|
||||
|
@ -112,10 +112,6 @@ func (g *Gateway) Run() {
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Gateway) Close() error {
|
||||
return g.ln.Close()
|
||||
}
|
||||
|
||||
func (g *Gateway) handleConn(conn net.Conn) {
|
||||
defer conn.Close()
|
||||
|
||||
|
@ -100,10 +100,6 @@ func (v *Muxer) SetRewriteHostFunc(f hostRewriteFunc) *Muxer {
|
||||
return v
|
||||
}
|
||||
|
||||
func (v *Muxer) Close() error {
|
||||
return v.listener.Close()
|
||||
}
|
||||
|
||||
type ChooseEndpointFunc func() (string, error)
|
||||
|
||||
type CreateConnFunc func(remoteAddr string) (net.Conn, error)
|
||||
|
@ -59,13 +59,3 @@ type ResourceController struct {
|
||||
// All server manager plugin
|
||||
PluginManager *plugin.Manager
|
||||
}
|
||||
|
||||
func (rc *ResourceController) Close() error {
|
||||
if rc.VhostHTTPSMuxer != nil {
|
||||
rc.VhostHTTPSMuxer.Close()
|
||||
}
|
||||
if rc.TCPMuxHTTPConnectMuxer != nil {
|
||||
rc.TCPMuxHTTPConnectMuxer.Close()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -386,30 +386,24 @@ func (svr *Service) Run(ctx context.Context) {
|
||||
func (svr *Service) Close() error {
|
||||
if svr.kcpListener != nil {
|
||||
svr.kcpListener.Close()
|
||||
svr.kcpListener = nil
|
||||
}
|
||||
if svr.quicListener != nil {
|
||||
svr.quicListener.Close()
|
||||
svr.quicListener = nil
|
||||
}
|
||||
if svr.websocketListener != nil {
|
||||
svr.websocketListener.Close()
|
||||
svr.websocketListener = nil
|
||||
}
|
||||
if svr.tlsListener != nil {
|
||||
svr.tlsListener.Close()
|
||||
}
|
||||
if svr.sshTunnelListener != nil {
|
||||
svr.sshTunnelListener.Close()
|
||||
svr.tlsConfig = nil
|
||||
}
|
||||
if svr.listener != nil {
|
||||
svr.listener.Close()
|
||||
svr.listener = nil
|
||||
}
|
||||
if svr.webServer != nil {
|
||||
svr.webServer.Close()
|
||||
}
|
||||
if svr.sshTunnelGateway != nil {
|
||||
svr.sshTunnelGateway.Close()
|
||||
}
|
||||
svr.rc.Close()
|
||||
svr.muxer.Close()
|
||||
svr.ctlManager.Close()
|
||||
if svr.cancel != nil {
|
||||
svr.cancel()
|
||||
|
Loading…
x
Reference in New Issue
Block a user