It is currently Wed Jun 23, 2021 7:24 am
All times are UTC + 8 hours

Has anyone gotten the new Reverse Proxy to work?

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

Postby ilike2burnthing » Tue Nov 10, 2020 6:06 am

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
ilike2burnthing
 
Posts: 173
Joined: Thu Apr 09, 2020 8:01 pm

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

Postby Nazar78 » Tue Nov 10, 2020 11:16 pm

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 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 295
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

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

Postby Nazar78 » Tue Nov 10, 2020 11:33 pm

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 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 295
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

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

Postby ilike2burnthing » Wed Nov 11, 2020 12:54 am

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

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

Postby ilike2burnthing » Wed Nov 11, 2020 2:26 am

Yep! All working fine and surviving reboot! Thanks :)
ilike2burnthing
 
Posts: 173
Joined: Thu Apr 09, 2020 8:01 pm

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

Postby Darkmagister » Wed Nov 11, 2020 7:25 pm

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
Darkmagister
 
Posts: 45
Joined: Sat Oct 27, 2018 4:36 pm

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

Postby Nazar78 » Wed Nov 11, 2020 8:52 pm

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 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 295
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

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

Postby Darkmagister » Wed Nov 11, 2020 9:58 pm

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
Darkmagister
 
Posts: 45
Joined: Sat Oct 27, 2018 4:36 pm

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

Postby Nazar78 » Wed Nov 11, 2020 11:22 pm

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 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 295
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

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

Postby ilike2burnthing » Thu Nov 12, 2020 6:59 pm

Currently banging my head against a brick wall with support... :roll:
ilike2burnthing
 
Posts: 173
Joined: Thu Apr 09, 2020 8:01 pm

PreviousNext

Return to ADM general

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 1 guest