mirror of
https://github.com/mmatczuk/go-http-tunnel.git
synced 2026-05-15 14:16:17 -06:00
[GH-ISSUE #112] [Feature Request] Add ability to Autoasign port in server and API to check available endpoints #61
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/go-http-tunnel#61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @toni-moreno on GitHub (Feb 25, 2020).
Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/112
Use case:
This feature request could be useful on cloud environments, where docker images could be created and ended.
In this context.
Supose you have two docker images starting a tunnel client
client 1
With this config.
(executing and adding an -id option)
client 2
(executing and adding an -id option)
Server Side
In the server side once each client is connected , the endpoint should be able to asign as TCP connection endpoint to any free port (from a port range). And add a REST endpoint to check how many connections exist and what IP:PORT shoud use to connect them.
with any HTTP GET client could get this list in json format
With this new feature any ssh/webdriver/XXXX client could connect to any image thougth tunnel server without any client specific config
@toni-moreno commented on GitHub (Apr 11, 2020):
Hello! ,to everybody.
I'm proud to announce a first release working as described before. Here: https://github.com/datadope-io/go-http-tunnel/tree/added_port_auto_assignation
Only tested with tcp connections, this branch is functional to me (working only with tcp ) , but not sure if working with http/sni protocol types.( not tested)
Client/Server Config
I've configured 2 clients on the same host.
client 1
tunnel -id probe-xxx -config ./client1_cfg/tunnel.yml start-allclient 2
tunnel -id probe-yyy -config client2_cfg/tunnel.yml start-allserver
tunneld -tlsCrt ./server_cfg/server.crt -tlsKey ./server_cfg/server.key -httpsAddr -httpAddr -tunnelAddr localhost:5223 -portRange 6010:6050 -apiAddr :8080Result