Compare commits

...

1 Commits

Author SHA1 Message Date
Quentin McGaw b00279bc61 hotfix(portforwarding): allow setting ports when no custom code is running 2026-07-29 06:06:09 +00:00
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ import (
"fmt"
"net/http"
"slices"
"strings"
"sync"
)
@@ -60,7 +61,8 @@ func (s *Service) SetPortsForwarded(ctx context.Context, ports []uint16) (err er
s.portMutex.Lock()
defer s.portMutex.Unlock()
if s.settings.PortForwarder != nil {
hasPortForwardingCodeRunning := !strings.HasSuffix(s.settings.PortForwarder.Name(), "[not supported]")
if hasPortForwardingCodeRunning {
return errors.New("setting port forwarded at runtime is not supported with internally running port forwarding code")
}
+1 -1
View File
@@ -55,7 +55,7 @@ func newNoPortForwarder(providerName string) *noPortForwarder {
}
func (n *noPortForwarder) Name() string {
return n.providerName
return n.providerName + " [not supported]"
}
func (n *noPortForwarder) PortForward(context.Context, pfutils.PortForwardObjects) (