Hi, how do you run forgejo under a reverse proxy while using an ssh channel to pull/push commits?

From what I understand caddy is only able to proxy http traffic.

  • asudox@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    Afaik you can reverse proxy the ssh connection. I’ve been connecting to my server using the domain and tld (asudox.dev)

    • wireless_purposely832@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

      Are you able to provide some details on how you are doing this? I don’t think you can do much with reverse proxies and SSH beyond routing all traffic on port 22 (or the configured SSH port) to whichever port SSH is listening on. In other words, the reverse proxy cannot route SSH traffic for the host on port 22 to the host, route SSH traffic for Forgejo on port 22 to Forgejo’s SSH process, and SFTP traffic on port 22 to the SFTP process - at least not via domain name like a HTTP/HTTPS reverse proxy would work.

      Instead, this would need to be done via IP address where the host SSH process listens on 192.168.1.2, the Forgejo SSH process listens on 192.168.1.3, and the SFTP process listens on 192.168.4. Otherwise, each of those services would need to use different ports.

      • asudox@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        4 months ago

        Upon more investigation, it seems more like caddy indeed can’t. The only reason it works is because I directly point the A record to the VPS’s IP.