Has anyone gotten the new Reverse Proxy to work?

ilike2burnthing
Posts: 396
youtube meble na wymiar Warszawa
Joined: Thu Apr 09, 2020 8:01 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by ilike2burnthing »

Damn, so close. Worked all the way up to restarting the NAS, and then, yep, ADM recreates the conf :roll:

I'll open a ticket. Ugh...

Thanks for all your help though!

EDIT: Ticket #37697
User avatar
Nazar78
Posts: 2078
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

ilike2burnthing wrote:Damn, so close. Worked all the way up to restarting the NAS, and then, yep, ADM recreates the conf :roll:

I'll open a ticket. Ugh...

Thanks for all your help though!

EDIT: Ticket #37697
While waiting for the official fix, on top of the nginx config, perhaps you can test this too see if it survives reboots as it seems to stick when you add more paths unless you edit that particular path then save it again.

/volume0/usr/builtin/etc/reverse_proxy/proxy.json

Append '\/' to the pass_path.

Code: Select all

"proxy_list":[
            {
              "id":"282c680a-3e4f-4179-8149-36ce979504c3",
              "status":1,
              "path":"\/radarr\/",
              "pass_https":false,
              "pass_domain":"192.168.1.6",
              "pass_path":"\/radarr\/",
              "pass_port":17878
            },
            {
              "id":"5dd4ec61-0eae-4d00-a376-1c7cb1460e4d",
              "status":1,
              "path":"\/sonarr\/",
              "pass_https":false,
              "pass_domain":"192.168.1.6",
              "pass_path":"\/sonarr\/",
              "pass_port":18989
            }
          ]
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 2078
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

Darkmagister wrote:
Nazar78 wrote: Yes you can use the same port 446 for all the subdomains because it's using a single listening port but differentiated by multiple domains similar to vhosts.
yess!!!

thanks a lot for all the support, i now have most of the app to work with the reverse proxy, i still have an issue with home assistant, i have create a subdomain: home.domain.it -> 192.168.1.20:8123
enabled the two option in HA config:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.20 # (NAS ip as it's the same for reverse proxy and HA)

i can see a login page after the login i get unable to connect and an error:
Firefox non può stabilire una connessione con il server wss://home.domain.it/api/websocket.
GET wss://home.domain.it/api/websocket
[HTTP/1.1 400 Bad Request 116ms]

i've disable ssl from HA and point to http in the reverse proxy (i've tried enabling the ssl but didn't change anything)

is there issue even in straight subdomain for websocket ?
NP.

Don't think this is websockets or reverse proxy issues, might be due to "Cross-Origin Controls" from the app. Disable the 'cors_allowed_origins' (vulnerable to CSRF attacks) or add your full qualified domain to it.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
ilike2burnthing
Posts: 396
Joined: Thu Apr 09, 2020 8:01 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by ilike2burnthing »

Tested with Tautulli and it survived reboot, will give the others a try now!
ilike2burnthing
Posts: 396
Joined: Thu Apr 09, 2020 8:01 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by ilike2burnthing »

Yep! All working fine and surviving reboot! Thanks :)
Darkmagister
Posts: 48
Joined: Sat Oct 27, 2018 4:36 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Darkmagister »

Nazar78 wrote: NP.

Don't think this is websockets or reverse proxy issues, might be due to "Cross-Origin Controls" from the app. Disable the 'cors_allowed_origins' (vulnerable to CSRF attacks) or add your full qualified domain to it.
ive done this:
cors_allowed_origins:
- https://home.domain.it

because i don't know how to disable ... but still i get the same error with wss connection error 400
AS6404T
User avatar
Nazar78
Posts: 2078
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

Darkmagister wrote:
Nazar78 wrote: NP.

Don't think this is websockets or reverse proxy issues, might be due to "Cross-Origin Controls" from the app. Disable the 'cors_allowed_origins' (vulnerable to CSRF attacks) or add your full qualified domain to it.
ive done this:
cors_allowed_origins:
- https://home.domain.it

because i don't know how to disable ... but still i get the same error with wss connection error 400
I'm not using this app but I just tested the websocket it works. This is without changing anything in HA other then adding the ADM reverse proxy and created the first admin account.

Sent: wss://home.mydomain.com/api/websocket

Response: {"type": "auth_required", "ha_version": "0.117.5"}

From the documentation, https://www.home-assistant.io/integrations/http/, cors_allowed_origins are disabled by default but I noticed you said you've enabled use_x_forwarded_for which requires trusted_proxies. Try reverting everything to default i.e. disabling the use_x_forwarded_for..
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Darkmagister
Posts: 48
Joined: Sat Oct 27, 2018 4:36 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Darkmagister »

Nazar78 wrote: I'm not using this app but I just tested the websocket it works. This is without changing anything in HA other then adding the ADM reverse proxy and created the first admin account.

Sent: wss://home.mydomain.com/api/websocket

Response: {"type": "auth_required", "ha_version": "0.117.5"}

From the documentation, https://www.home-assistant.io/integrations/http/, cors_allowed_origins are disabled by default but I noticed you said you've enabled use_x_forwarded_for which requires trusted_proxies. Try reverting everything to default i.e. disabling the use_x_forwarded_for..
unfortunatelly didn't work here ...
i've removed:
# use_x_forwarded_for: true
# trusted_proxies:
# cors_allowed_origins:

but still not passing the login form, i also tried removing the ssl from config file and restart (and change the reverse proxy from https to http)

but then i get issue in starting the docker image of homeassistant:
ERROR (MainThread) [aiohttp.server] Error handling request,
Traceback (most recent call last):,
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 275, in data_received,
messages, upgraded, tail = self._request_parser.feed_data(data),
File "aiohttp/_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data,
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method,

i don't know if it's related to something or not
AS6404T
User avatar
Nazar78
Posts: 2078
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

YAML is very strict especially its indentations. Did you happen to messed it up? Else I suggest reinstalling from scratch. Uninstall, backup and remove the configs in /volume1/Docker/HomeAssistant then reinstall. Sorry I believe this is app related not reverse proxy. I just tested without issues. Best to open a new thread for this as not to unnecessarily notify others who's subscribed to this thread.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
ilike2burnthing
Posts: 396
Joined: Thu Apr 09, 2020 8:01 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by ilike2burnthing »

Currently banging my head against a brick wall with support... :roll:
Post Reply

Return to “ADM general”