mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 08:03:49 +01:00
no need to update targets when reserved backend mode is 'socks' (#558)
This commit is contained in:
parent
2982e43685
commit
d58779c7e2
@ -93,23 +93,25 @@ func (cmd *shareReservedCommand) run(_ *cobra.Command, args []string) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.Infof("sharing target: '%v'", target)
|
if resp.Payload.BackendMode != "socks" {
|
||||||
|
logrus.Infof("sharing target: '%v'", target)
|
||||||
|
|
||||||
if resp.Payload.BackendProxyEndpoint != target {
|
if resp.Payload.BackendProxyEndpoint != target {
|
||||||
upReq := share.NewUpdateShareParams()
|
upReq := share.NewUpdateShareParams()
|
||||||
upReq.Body = &rest_model_zrok.UpdateShareRequest{
|
upReq.Body = &rest_model_zrok.UpdateShareRequest{
|
||||||
ShrToken: shrToken,
|
ShrToken: shrToken,
|
||||||
BackendProxyEndpoint: target,
|
BackendProxyEndpoint: target,
|
||||||
}
|
|
||||||
if _, err := zrok.Share.UpdateShare(upReq, auth); err != nil {
|
|
||||||
if !panicInstead {
|
|
||||||
tui.Error("unable to update backend proxy endpoint", err)
|
|
||||||
}
|
}
|
||||||
panic(err)
|
if _, err := zrok.Share.UpdateShare(upReq, auth); err != nil {
|
||||||
|
if !panicInstead {
|
||||||
|
tui.Error("unable to update backend proxy endpoint", err)
|
||||||
|
}
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
logrus.Infof("updated backend proxy endpoint to: %v", target)
|
||||||
|
} else {
|
||||||
|
logrus.Infof("using existing backend proxy endpoint: %v", target)
|
||||||
}
|
}
|
||||||
logrus.Infof("updated backend proxy endpoint to: %v", target)
|
|
||||||
} else {
|
|
||||||
logrus.Infof("using existing backend proxy endpoint: %v", target)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var shareDescription string
|
var shareDescription string
|
||||||
|
Loading…
Reference in New Issue
Block a user