DEV Community

Discussion on: PrxPass - A reverse-proxy self-hosted solution (aka local tunnel)

Collapse
 
bernhardberger profile image
Bernhard Berger

I'm having more issues with prxpass..

My goal is to create a tunnel for a mysql-server running on docker (for local development purposes only). Idea:

local-dev-proxy (accessible through local.mydomain.tld -> 127.0.0.1):

  • traefik: 80,443
  • prxpass-server: 3306

compose_project_a:

  • web:80 -> traefik reverse proxy (http(s)://project-a.local.mydomain.tld)
  • db:3306 -> prxpass-server (tcp://project-a.local.mydomain.tld:3306)

compose_project_b:

  • web:80 -> traefik reverse proxy (http(s)://project-b.local.mydomain.tld)
  • db:3306 -> prxpass-server (tcp://project-b.local.mydomain.tld:3306)

By the documentation this is exactly the scenario that should be achievable with prxpass, I however have a few issues:

1) starting the server with app -tcp actually opens the HTTP config as written in config.toml (creates only an http tunnel)

2) I fire up the client with

app -server prxpass-server:<TCP_PORT> -proxy-to db:3306 -id db -password mysecret results in
a) "connection refused (as only the http tunnel configured on port 8000 is opened)"
and b) it completely ignores the part which would be vital in my case..

Any ideas on how I could achieve this?

Collapse
 
defman profile image
Sergey Kislyakov • Edited

TCP is not yet supported. I kinda don't understand your problem though. Are you running a MySQL server on your machine (127.0.0.1:3306) and you want to access it from the Internet at e.g. db.whatever.com? At least that's the idea of PrxPass - you expose your local stuff to the Internet via your public server. You can only achieve something like this:

lol

Collapse
 
bernhardberger profile image
Bernhard Berger

I'm running multiple docker projects on my host (each in a private closed network, e.g. 172.16.x.x) and I want to expose it through a tcp proxy on my local network (127.0.0.x) for convinience (external DB tools like DBeaver/HeidiSQL/Navicat) and mysql command line clients.

The *.local.domain.tld is just an A-Record pointing to 127.0.0.1..

I basically need a tcp reverse proxy solution that I can automate on environment start and stop.

I know HAproxy and nginx (to some extent) can handle TCP routing, but it's a massive overhead I'd like to avoid.

Thread Thread
 
defman profile image
Sergey Kislyakov

I've updated my reply. What you're trying to achieve is not the intended usage of PrxPass (at least at the moment). You want to expose your hosts docker network to your local network and I guess you can do that by setting up a VPN tunnel to your host.