staging #46

Merged
bagas merged 8 commits from staging into main 2025-12-28 13:19:25 +00:00
3 changed files with 4 additions and 2 deletions
Showing only changes of commit b5862bd7a0 - Show all commits

View File

@@ -40,7 +40,7 @@ USER appuser
ENV TZ=Asia/Jakarta
EXPOSE 2200 80 8443
EXPOSE 2200 8080 8443
LABEL org.opencontainers.image.title="Tunnel Please" \
org.opencontainers.image.description="SSH-based tunnel server"

View File

@@ -22,6 +22,7 @@ The following environment variables can be configured in the `.env` file:
|----------|-------------|---------|----------|
| `DOMAIN` | Domain name for subdomain routing | `localhost` | No |
| `PORT` | SSH server port | `2200` | No |
| `HTTP_PORT` | HTTP server port | `8080` | No |
| `HTTPS_PORT` | HTTPS server port | `8443` | No |
| `TLS_ENABLED` | Enable TLS/HTTPS | `false` | No |
| `TLS_REDIRECT` | Redirect HTTP to HTTPS | `false` | No |

View File

@@ -193,7 +193,8 @@ func (cw *CustomWriter) AddInteraction(interaction Interaction) {
var redirectTLS = false
func NewHTTPServer() error {
listener, err := net.Listen("tcp", ":80")
httpPort := utils.Getenv("HTTP_PORT", "8080")
listener, err := net.Listen("tcp", ":"+httpPort)
if err != nil {
return errors.New("Error listening: " + err.Error())
}