Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Reverse proxying on a single port #51

Open
JamesCarpenter opened this issue Oct 12, 2016 · 7 comments
Open

Reverse proxying on a single port #51

JamesCarpenter opened this issue Oct 12, 2016 · 7 comments

Comments

@JamesCarpenter
Copy link

JamesCarpenter commented Oct 12, 2016

Hi there,

First off - great work on Ulterius, it looks fantastic so far.

Secondly, I wonder if you can help? I'm trying to reverse proxy Ulterius on a single port so that I can have all traffic run over 80 for ease of access from restricted networks (eventually I'll use 443 and HTTPS/WSS but for now I'm using 80 to simplify the PoC).

I can see that this should be possible (using the API endpoints /api /webcam etc) and I have the web portion and api running successfully just by entering port 80 at the connection dialogue, but I can't find a way to point the client to a specific port for webcam, screen sharing, etc. I saw in settings that you can choose a port for these, but the setting is server-side which is obviously not what I'm trying to achieve.

Is there a way I can get the client to point to those endpoints on a specific port (e.g. point all to port 80) and have them forward to the correct ports on the server using the reverse proxy?

Below is a copy of my vhost setup to clarify what I mean:

<VirtualHost *:80>

    ServerAdmin <redacted>
    DocumentRoot /var/www/html
    ServerName <redacted>
  ProxyRequests Off
  ProxyVia Off
    <Proxy *>
     Order deny,allow
     Allow from all
    </Proxy>

ProxyPass /api ws://10.0.0.5:22007/
ProxyPassReverse /api ws://10.0.0.5:22007/

ProxyPass /webcam ws://10.0.0.5:22010/
ProxyPassReverse /webcam ws://10.0.0.5:22010/

ProxyPass /terminal ws://10.0.0.5:22008/
ProxyPassReverse /terminal ws://10.0.0.5:22008/

ProxyPass /screenshare ws://10.0.0.5:22009/
ProxyPassReverse /screenshare ws://10.0.0.5:22009/

ProxyPass / http://10.0.0.5:22006/
ProxyPassReverse / http://10.0.0.5:22006/

</VirtualHost>
@andrewmd5
Copy link
Member

Hi James,

The client request a list of ports from the server (located in your config)
which is where it sends client request. As of now there is no setting to
override the server ports, however you could edit the client fairly easily
to do this.

We can look into client side port overrides later this week.

You can find a reverse proxy in nginix example here

https://blog.ulterius.io/ulterius-progress-report-august-2016/

On Wednesday, October 12, 2016, JamesCarpenter notifications@github.com
wrote:

Hi there,

First off - great work on Ulterius, it looks fantastic so far.

Secondly, I wonder if you can help? I'm trying to reverse proxy Ulterius
on a single port so that I can have all traffic run over 80 for ease of
access from restricted networks (eventually I'll use 443 and HTTPS/WSS but
for now I'm using 80 to simplify the PoC).

I can see that this should be possible (using the API endpoints /api
/webcam etc) and I have the web portion and api running successfully just
by entering port 80 at the connection dialogue, but I can't find a way to
point the client to a specific port for webcam, screen sharing, etc. I saw
in settings that you can choose a port for these, but the setting is
server-side which is obviously not what I'm trying to achieve.

Is there a way I can get the client to point to those endpoints on a
specific port (e.g. point all to port 80) and have them forward to the
correct ports on the server using the reverse proxy?

Below is a copy of my vhost setup to clarify what I mean:

ServerAdmin
DocumentRoot /var/www/html
ServerName

ProxyRequests Off
ProxyVia Off

Order deny,allow
Allow from all

ProxyPass /api ws://10.0.0.5:22007/
ProxyPassReverse /api ws://10.0.0.5:22007/

ProxyPass /webcam ws://10.0.0.5:22010/
ProxyPassReverse /webcam ws://10.0.0.5:22010/

ProxyPass /terminal ws://10.0.0.5:22008/
ProxyPassReverse /terminal ws://10.0.0.5:22008/

ProxyPass /screenshare ws://10.0.0.5:22009/
ProxyPassReverse /screenshare ws://10.0.0.5:22009/

ProxyPass / http://10.0.0.5:22006/
ProxyPassReverse / http://10.0.0.5:22006/


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#51, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPKtY5dV2_lYOKjhQMTPCz2ELQMnLh_ks5qzW5JgaJpZM4KVVMA
.

@JamesCarpenter
Copy link
Author

JamesCarpenter commented Oct 13, 2016

Hi - thanks for the swift reply! I did have a look at trying to edit the client, but I'll be honest it looks like it's beyond my limited programming abilities.

If you could point me in the right direction (which file/function) I'll have another crack but no worries if not.

Thanks again

P.s. I saw the reverse proxy example - it was handy, thanks!

@JamesCarpenter
Copy link
Author

Update: I found that by just changing "this.port" in the minified bundle.js to 80 I was able to make it work :)

@andrewmd5
Copy link
Member

Thanks James, this actually just made me realize something about the
overall design of Ulterius and in the future all logic is possibility going
to go through a single port of 22007 (web will still be on 22006)

On Wednesday, October 12, 2016, JamesCarpenter notifications@github.com
wrote:

Update: I found that by just changing "this.port" in the minified
bundle.js to 80 I was able to make it work :)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#51 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABPKtRcXzLx5_8PaEAeaGV8pm3NEoH5Eks5qzYs4gaJpZM4KVVMA
.

@JamesCarpenter
Copy link
Author

Hi guys, I had this working great, but the server has now updated and I'm no longer able to find the bundle.js which I was able to edit last time to fix the problem I was having... Any ideas?

@andrewmd5
Copy link
Member

Hi @JamesCarpenter

IT is located in system32 as Ulterius runs as a service now

C:\Windows\System32\config\systemprofile

@JamesCarpenter
Copy link
Author

Makes sense - thanks very much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants