detect new container port listeners, automatically forward from host · Issue #47 · boldsoftware/sketch · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
innie process runs "netstat -lntu" in a polling loop to monitor port listeners inside the container
if a new port listener appears (or old one disappears), innie posts a message to outie with the port number (maybe some other info?)
when outie gets a "/port-listner-changed" event from innie, it shells out to "ssh -L hostPort:127.0.0.1:containerPort" to start tunneling over ssh, and updates the UI to let the user know about the newly tunneled port.
At least one gotcha to consider: we might not always (or even usually?) be able to make hostPort == containerPort
e.g.: app inside container starts with -p 8080 so it prints out "visit http://localhost:8080" to the terminal
innie netstat poller picks up the new listener on 8080, POSTs to outie about it
outie gets the new-port-listener msg, however: 8080 is already taken on host by some other process
outie assigns a different port than the one requested by the innie, say 8081: "ssh -L 8081:127.0.0.1:8080"
...confusion ensues when you click on the "visit http://localhost:8080" message from the container and do not get the app that printed that message
The text was updated successfully, but these errors were encountered:
rough outline:
At least one gotcha to consider: we might not always (or even usually?) be able to make hostPort == containerPort
The text was updated successfully, but these errors were encountered: