Proposal: URL addresses to replace ports

Proposal: URL addresses to replace ports

Postby mdi » Thu Jan 03, 2013 7:47 pm

Hi,
would it be possible to set a specific URL to each service, so that the service could be addressed from port 80 instead of a specific one?

The original Lacie firmware can be accessed only from port 80, which simplifies accessing the device, especially if using a dynamic DNS service.

In my case, I'm behind such dynamic service and I'd really like to access the transmission client, or, now, the camera, from the internet, but I cannot define many addresses and having them associated with different ports.

It could help to have each service under a specific name, like http://nas-ip/transmission or http://nas-ip/motion, etc.
Similar like you've already done with the web-explorer.

That could help also accessing all the services from the office, from which I am allowed to exit only for web traffic on port 80.

Great firmware anyway! :) Still glad of it so much! :rock
mdi
Donator VIP
Donator VIP
 
Posts: 193
Joined: Tue Oct 11, 2011 1:20 pm

Re: Proposal: URL addresses to replace ports

Postby Jocko » Thu Jan 03, 2013 9:25 pm

Hi mdi,

In principle, I do not think it possible: one application per port. (it's a basic TCP rule)

In the current firmware version, some features use the same port because it shares the same demon. This is the case for the web interface firmware, webdav and webexplorer because all three use the apache server. All other features using various demons and so they have specific ports.

Today, only torrent-flux could be added instead of using a virtual server, it is possible to use an alias.

In the original version, if I remember correctly, for example, you do not have direct access to the transmission-cli interface but using a sub-menu in the main web interface.

Note: it is amazing that you can not also use port 443 which is in principle always open to allow url "https://".

Note1: I strongly recommend not using WAN access on port 80: all data sent over the WAN are readable by a hacker. For example, the administrator from your office can know what you do and get your login! So use access on port 443
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Proposal: URL addresses to replace ports

Postby mdi » Thu Jan 03, 2013 9:32 pm

Thanks, precious infos :)

Anyway, yes, they also open port 443, but they don't allow to use others, like 8080 for example.
mdi
Donator VIP
Donator VIP
 
Posts: 193
Joined: Tue Oct 11, 2011 1:20 pm

Re: Proposal: URL addresses to replace ports

Postby Jocko » Thu Jan 03, 2013 10:16 pm

if you want, I can send you a patch where torrent-flux is available via the url : http(s)://nasmane/torrentflux or http(s)://yourDDNS/torrentflux.

Note : by causing the upgrade to php 5.4.7, we had to do several fixes for this torrent client but now several features are restored like the search engines
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Proposal: URL addresses to replace ports

Postby Mijzelf » Fri Jan 04, 2013 10:23 am

Jocko wrote:In principle, I do not think it possible: one application per port. (it's a basic TCP rule)
Most webservers support a 'proxy' mode. For instance, for lighttpd:
Code: Select all
$HTTP["url"] =~ "^/transmission($|/)" {
                proxy.server = ( "" =>
                        ( (
                            "host" => "127.0.0.1",
                            "port" => 9091
                        ) )
                )
        }
When accessing the server as http://nas-ip/transmission, you get the page served from localhost:9091.
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: Proposal: URL addresses to replace ports

Postby rafesl » Fri Jan 04, 2013 10:32 am

Apache has a ProxyPass module which does similar work.
rafesl
Donator VIP
Donator VIP
 
Posts: 39
Joined: Mon Jul 16, 2012 11:48 am

Re: Proposal: URL addresses to replace ports

Postby Jocko » Fri Jan 04, 2013 10:41 am

Hi Mijzelf,

I know this method but currently we didn't include the proxy module with the apache server.
For the small devices (nwsp1 and SPD8020), there is already a memory used size issue and to use the Httpd server can down the performance.

But maybe we must test this way
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Proposal: URL addresses to replace ports

Postby Mijzelf » Fri Jan 04, 2013 10:44 am

In that case I can recommend lighttpd anyway, as it's resource use is significantly lower.
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: Proposal: URL addresses to replace ports

Postby Jocko » Fri Jan 04, 2013 11:07 am

As you propose,with the last apache upgrade I begin to think to use lighttp instead of httpd would be better.
But change to http server means much work, I prefer first to begin to test how the apache server behaves by addind the two proxy modules because few changes must be do in httpd conf file.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Proposal: URL addresses to replace ports

Postby favroom » Sun Jun 23, 2013 11:10 am

Jocko wrote:I prefer first to begin to test how the apache server behaves by addind the two proxy modules because few changes must be do in httpd conf file.


Do I understand correctly that I can start using apache proxy mod by changing the httpd conf file? Or do I need a patch to add these proxy mods first?

I found two httpd.conf files on my NWSP 2:
/usr/conf/httpd.conf
/etc/httpd.conf
favroom
 
Posts: 71
Joined: Thu Dec 13, 2012 7:09 am
Location: Netherlands

Next

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: Bing Bot and 9 guests