update gophertunnel

This commit is contained in:
olebeck 2023-02-22 11:22:39 +01:00
parent 956448d707
commit 6acb821a5a
3 changed files with 8 additions and 4 deletions

2
go.mod
View File

@ -3,7 +3,7 @@ module github.com/bedrock-tool/bedrocktool
go 1.19
//replace github.com/sandertv/gophertunnel => ./gophertunnel
replace github.com/sandertv/gophertunnel => github.com/olebeck/gophertunnel v1.27.3-1
replace github.com/sandertv/gophertunnel => github.com/olebeck/gophertunnel v1.27.3-2
//replace github.com/df-mc/dragonfly => ./dragonfly
replace github.com/df-mc/dragonfly => github.com/olebeck/dragonfly v0.9.2-1

2
go.sum
View File

@ -72,6 +72,8 @@ github.com/olebeck/gophertunnel v1.27.2-4 h1:O9jASdeAd8D8l2P9WxEc/h8vcId9SKXVRSo
github.com/olebeck/gophertunnel v1.27.2-4/go.mod h1:hgVpDdaLDP/39Z/YqEU0WFi/DHRDHqvBs3XGqkB4tnU=
github.com/olebeck/gophertunnel v1.27.3-1 h1:fexwhP7Pipgj0HohdjElOrPOZURZAGhPUFDst86gCus=
github.com/olebeck/gophertunnel v1.27.3-1/go.mod h1:ekREo7U9TPHh86kbuPMaWA93NMyWsfVvP/iNT3XhAb8=
github.com/olebeck/gophertunnel v1.27.3-2 h1:hl85ShVJUiIR+mGHfUgEDNVxN4r/XBVzqL8Kphl+Q9k=
github.com/olebeck/gophertunnel v1.27.3-2/go.mod h1:ekREo7U9TPHh86kbuPMaWA93NMyWsfVvP/iNT3XhAb8=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

View File

@ -120,8 +120,9 @@ func (s *skinsSession) Save(fpath string) error {
}
type SkinCMD struct {
serverAddress string
filter string
serverAddress string
filter string
pathCustomUserData string
}
func (*SkinCMD) Name() string { return "skins" }
@ -130,6 +131,7 @@ func (*SkinCMD) Synopsis() string { return locale.Loc("skins_synopsis", nil) }
func (c *SkinCMD) SetFlags(f *flag.FlagSet) {
f.StringVar(&c.serverAddress, "address", "", locale.Loc("remote_address", nil))
f.StringVar(&c.filter, "filter", "", locale.Loc("name_prefix", nil))
f.StringVar(&c.pathCustomUserData, "userdata", "", locale.Loc("custom_user_data", nil))
}
func (c *SkinCMD) Usage() string {
@ -143,7 +145,7 @@ func (c *SkinCMD) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}
return 1
}
proxy, _ := utils.NewProxy("")
proxy, _ := utils.NewProxy(c.pathCustomUserData)
proxy.WithClient = false
proxy.ConnectCB = func(proxy *utils.ProxyContext) {
logrus.Info(locale.Loc("ctrl_c_to_exit", nil))