pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.7k stars 1.7k forks source link

Panel settings web interface will redirect HTTP to HTTPS #4364

Closed shodanx2 closed 2 years ago

shodanx2 commented 2 years ago

Current Behavior

Hi,

This is generally related to issues #277,#3017,#4205

My setup is as follows

This access works pterodactyl.example.com:443 -> router -> nginx.lan:443 -> pterodactyl.lan:80

But I'm on the right hand side of the router, I can't access pterodactyl.example.com:443 from inside the network Instead I must use http://pterodactyl.lan

This "works" except for one slight annoyance, after making it to the settings page, every click, and even a mouseover, will redirect to https://pterodactyl.lan which doesn't connect

This installation was created using the Techno Tim tutorial here

The yml file I used to setup the docker container was here

Here is a screenshot of the issue, observe at the bottom the click URL for the UI element I am mouseover

image

Doing a mouseover in the location list of the location menu, will instantly redirect, so you have to move your mouse very carefully.


Hello, I would note, at the bottom of this dialog you stipulate

I have checked in the Discord server and believe [...]

I do not accept the discord terms of services and therefore am not a discord user. Please remove this requirement to subscribe to discord before posting issues

Expected Behavior

If on http stay on http, if on https stay on https non-cosmetic rewriting the url to an invalid url will cut out the communcation

Steps to Reproduce

create lxc container with ubuntu 22.04 set dhcp mode, set hostname pterodactyl (router domain is .lan) apt update upgrade and install docker-compose

mkdir /opt/pterodactyl mkdir /opt/pterodactyl/panel nano /opt/pterodactyl/panel/docker-compose.yml paste yml file from below cd /opt/pterodactyl/panel/docker-compose.yml docker-compose up -d docker-compose run --rm panel php artisan p:user:mak

then open firefox to http://pterodactyl.lan, go to settings


version: '3.8' x-common: database: &db-environment

Do not remove the "&db-password" from the end of the line below, it is important

# for Panel functionality.
MYSQL_PASSWORD: &db-password "mypassword"
MYSQL_ROOT_PASSWORD: "mypassword"

panel: &panel-environment APP_URL: "https://pterodactyl.example.com"

A list of valid timezones can be found here: http://php.net/manual/en/timezones.php

APP_TIMEZONE: "America/Montreal"
APP_SERVICE_AUTHOR: "pterodactyl@example.com"
TRUSTED_PROXIES: "*" # Set this to your proxy IP
# Uncomment the line below and set to a non-empty value if you want to use Let's Encrypt
# to generate an SSL certificate for the Panel.
# LE_EMAIL: ""

mail: &mail-environment MAIL_FROM: "pterodactyl@example.com" MAIL_DRIVER: "smtp" MAIL_HOST: "mail" MAIL_PORT: "1025" MAIL_USERNAME: "" MAIL_PASSWORD: "" MAIL_ENCRYPTION: "true"

#

------------------------------------------------------------------------------------------

DANGER ZONE BELOW

#

The remainder of this file likely does not need to be changed. Please only make modifications

below if you understand what you are doing.

# services: database: image: mariadb:10.5 restart: always command: --default-authentication-plugin=mysql_native_password volumes:

Panel Version

canary

Wings Version

not applicable at this stage

Games and/or Eggs Affected

none installed yet

Docker Image

ghcr.io/pterodactyl/panel:latest

Error Logs

No response

Is there an existing issue for this?

Boy132 commented 2 years ago

Please visit the discord for configuration issues. This is not a bug.

danny6167 commented 2 years ago

You can refuse to join discord all you like, but I don't see them making changes to accommodate your broken network.

shodanx2 commented 2 years ago

@boy132, as specified, discord is inaccessible, if you have spotted a configuration error, please state exactly what you believe it is.

@danny6167 If you are going to make claims like "your network is broken", then specify why do you think that is the case. Or else simply do not reply, since that comment contained no information.

danny6167 commented 2 years ago

Being unable to access the services with the correct address and at the correct ports because of your broken or wrongly configured router is your broken network. I'm just telling you not to get your hopes up on a change to "fix" something that is wrong with your setup and not a bug with the panel.

DaneEveritt commented 2 years ago

I do not provide network support, nor do I consider it a bug in this software.

parkervcp commented 2 years ago

As part of your example you have the app url set as such APP_URL: "https://pterodactyl.example.com/"

Make that the internal http address instead. Externally your proxy should manage the connections and redirect properly. You could use the ip address internally too.