running on a non-standard port

#1

Hi!

First of all, I would like to thank you for sharing your work.

Autobahn is great! Thank you!

I would like to run Autobahn Python on a non-standard port on the server but make a redirect from e.g. port 443 in my firewall.

However, this seems to break due to the port validation made in websocket.py where it compares factory.port to either the request host header or the standard ports.

Is there something I have overlooked?

Or could it be possible to somehow tell autobahn to compare the header to a user defined port instead of factory.port and skip the standard port check in case the header contains no port?

Best regards,

Martin

0 Likes

#2

Hi!

First of all, I would like to thank you for sharing your work.
Autobahn is great! Thank you!

Thanks .. nice to hear!

I would like to run Autobahn Python on a non-standard port on the server
but make a redirect from e.g. port 443 in my firewall.
However, this seems to break due to the port validation made in
websocket.py where it compares factory.port to either the request host
header or the standard ports.

Is there something I have overlooked?
Or could it be possible to somehow tell autobahn to compare the header
to a user defined port instead of factory.port and skip the standard
port check in case the header contains no port?

Best regards,
Martin

The check will currently be enforced always. I see 2 options to make
stuff work when running Autobahn behind a L2/L3 forwarding device:

a) have an option to disable the check altogether
b) have an option to specify the public visible port (which can then differ from the port Autobahn is actually running)

I'd probably prefer b) .. via extending the constructor of WebSocketServerFactory.

Thoughts?

Cheers,
Tobias

···

Am 10.09.2012 11:13, schrieb vopatek:

0 Likes

#3

Hi!

Thanks for the fast reply!

I agree and vote for option b as well.

Martin

···

Den måndagen den 10:e september 2012 kl. 11:13:51 UTC+2 skrev vopatek:

Hi!

First of all, I would like to thank you for sharing your work.

Autobahn is great! Thank you!

I would like to run Autobahn Python on a non-standard port on the server but make a redirect from e.g. port 443 in my firewall.

However, this seems to break due to the port validation made in websocket.py where it compares factory.port to either the request host header or the standard ports.

Is there something I have overlooked?

Or could it be possible to somehow tell autobahn to compare the header to a user defined port instead of factory.port and skip the standard port check in case the header contains no port?

Best regards,

Martin

0 Likes

#4

Hi!

Sorry, wrong reply button!

I agree and vote for option b as well.

Martin

···

Den måndagen den 10:e september 2012 kl. 12:55:03 UTC+2 skrev Tobias Oberstein:

Am 10.09.2012 11:13, schrieb vopatek:

Hi!

First of all, I would like to thank you for sharing your work.

Autobahn is great! Thank you!

Thanks … nice to hear!

I would like to run Autobahn Python on a non-standard port on the server

but make a redirect from e.g. port 443 in my firewall.

However, this seems to break due to the port validation made in

websocket.py where it compares factory.port to either the request host

header or the standard ports.

Is there something I have overlooked?

Or could it be possible to somehow tell autobahn to compare the header

to a user defined port instead of factory.port and skip the standard

port check in case the header contains no port?

Best regards,

Martin

The check will currently be enforced always. I see 2 options to make

stuff work when running Autobahn behind a L2/L3 forwarding device:

a) have an option to disable the check altogether

b) have an option to specify the public visible port (which can then
differ from the port Autobahn is actually running)

I’d probably prefer b) … via extending the constructor of
WebSocketServerFactory.

Thoughts?

Cheers,

Tobias

0 Likes

#5

Could you check if the latest code from repo works for you?

https://github.com/tavendo/AutobahnPython/commit/8851bf76310afc1f0321753f5a980150dc69e29f

factory = WebSocketServerFactory("wss://localhost:9090",
                                  externalPort = 443)

0 Likes

#6

That was fast!

Works for me.

Thank you!

Martin

···

Den måndagen den 10:e september 2012 kl. 13:34:33 UTC+2 skrev Tobias Oberstein:

Could you check if the latest code from repo works for you?

https://github.com/tavendo/AutobahnPython/commit/8851bf76310afc1f0321753f5a980150dc69e29f

factory = WebSocketServerFactory(“wss://localhost:9090”,

                              externalPort = 443)
0 Likes