Skip to content

Commit

Permalink
Bump frp version to 0.42.0
Browse files Browse the repository at this point in the history
  • Loading branch information
koho committed Apr 22, 2022
1 parent 77a4605 commit cb64ee1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ module github.com/koho/frpmgr
go 1.16

require (
github.com/fatedier/frp v0.41.0
github.com/fatedier/golib v0.1.1-0.20220321042308-c306138b83ac
github.com/fatedier/frp v0.42.0
github.com/go-ole/go-ole v1.2.6
github.com/lxn/walk v0.0.0-20210112085537-c389da54e794
github.com/lxn/win v0.0.0-20210218163916-a377121e959e
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb h1:wCrNShQidLmvVWn/0PikGmpdP0vtQmnvyRg3ZBEhczw=
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb/go.mod h1:wx3gB6dbIfBRcucp94PI9Bt3I0F2c/MyNEWuhzpWiwk=
github.com/fatedier/frp v0.41.0 h1:KIOzLlrWqEZZ9b9eVT8SSSgx4If47gMTAttaEz10l4o=
github.com/fatedier/frp v0.41.0/go.mod h1:3Mp3fWvK8kD3PU8Hy89fKV/655Q5eFSHr+uuUr/lbOg=
github.com/fatedier/frp v0.42.0 h1:IIPCKB5OgGetjIk7vv3MlR3iL8qS0d7uM3kjWs6eymU=
github.com/fatedier/frp v0.42.0/go.mod h1:NahedvXauelo3mcioq3gahG3BdhTfJ4Gia6rRQnE02A=
github.com/fatedier/golib v0.1.1-0.20220321042308-c306138b83ac h1:td1FJwN/oz8+9GldeEm3YdBX0Husc0FSPywLesZxi4w=
github.com/fatedier/golib v0.1.1-0.20220321042308-c306138b83ac/go.mod h1:fLV0TLwHqrnB/L3jbNl67Gn6PCLggDGHniX1wLrA2Qo=
github.com/fatedier/kcp-go v2.0.4-0.20190803094908-fe8645b0a904+incompatible h1:ssXat9YXFvigNge/IkkZvFMn8yeYKFX+uI6wn2mLJ74=
Expand Down Expand Up @@ -296,8 +296,8 @@ github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je4
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pires/go-proxyproto v0.5.0 h1:A4Jv4ZCaV3AFJeGh5mGwkz4iuWUYMlQ7IoO/GTuSuLo=
github.com/pires/go-proxyproto v0.5.0/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY=
github.com/pires/go-proxyproto v0.6.2 h1:KAZ7UteSOt6urjme6ZldyFm4wDe/z0ZUP0Yv0Dos0d8=
github.com/pires/go-proxyproto v0.6.2/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down
20 changes: 10 additions & 10 deletions patches/service.patch
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
--- pkg/mod/github.com/fatedier/[email protected]/client/service.go 2022-03-24 15:06:41.000000000 +0800
+++ patches/service.go 2022-03-24 15:10:43.000000000 +0800
@@ -36,12 +36,13 @@
"github.com/fatedier/frp/pkg/util/util"
--- pkg/mod/github.com/fatedier/[email protected]/client/service.go 2022-04-22 14:59:20.000000000 +0800
+++ patches/service.go 2022-04-22 15:10:29.000000000 +0800
@@ -39,12 +39,13 @@
"github.com/fatedier/frp/pkg/util/version"
"github.com/fatedier/frp/pkg/util/xlog"
"github.com/fatedier/golib/crypto"
libdial "github.com/fatedier/golib/net/dial"

fmux "github.com/hashicorp/yamux"
+ frpmgr "github.com/koho/frpmgr/pkg/util"
)

// Service is a client service.
type Service struct {
// uniq id got from frps, attach it in loginMsg
runID string
@@ -248,14 +249,20 @@
func init() {
crypto.DefaultSalt = "frp"
rand.Seed(time.Now().UnixNano())
}
@@ -271,14 +272,20 @@
libdial.WithProxyAuth(auth),
libdial.WithTLSConfig(tlsConfig),
libdial.WithAfterHook(libdial.AfterHook{
Hook: frpNet.DialHookCustomTLSHeadByte(tlsConfig != nil, svr.cfg.DisableCustomTLSFirstByte),
}),
)
+ var serverAddr = svr.cfg.ServerAddr
+ if svr.cfg.DNSServer != "" && runtime.GOOS == "windows" {
+ if svr.cfg.DNSServer != "" {
+ if serverAddr, err = frpmgr.LookupIP(svr.cfg.ServerAddr, svr.cfg.DNSServer); err != nil {
+ return nil, nil, err
+ }
Expand Down
5 changes: 0 additions & 5 deletions services/frp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ import (
_ "github.com/fatedier/frp/assets/frpc"
frpc "github.com/fatedier/frp/cmd/frpc/sub"
"github.com/fatedier/frp/pkg/config"
"github.com/fatedier/golib/crypto"
"math/rand"
"time"
)

func runFrpClient() {
crypto.DefaultSalt = "frp"
rand.Seed(time.Now().UnixNano())
// Change program arguments for frpc to parse
// No need to change it for now
frpc.Execute()
Expand Down

0 comments on commit cb64ee1

Please sign in to comment.