IP filtering for multiple IPs

Discuss issues related to PS3 Media Server development (only for programmers)

IP filtering for multiple IPs

Postby Dave114 » Sat Sep 24, 2011 11:05 pm

Hi,

I posted a patch for IP filtering with multiple IPs earlier today which I tagged onto the end of an old thread - viewtopic.php?f=6&t=2282#p57361 - which I'm guessing might have been better posted to this forum (hence this post).

Received a comment mentioning that this was "useless because they are using HTTP v2 engine", yet I'm running 1.40 with the HTTP engine checked on in my config and it seems to work for me. Hoping someone can clarify.
Dave114
 
Posts: 12
Joined: Sat Sep 24, 2011 12:31 pm

Re: IP filtering for multiple IPs

Postby Dave114 » Sat Sep 24, 2011 11:59 pm

Where exactly is HTTP Engine v2 getting triggered? Been poking around in the source trying to see if there's something I'm missing:

Code: Select all
$ grep -iRal http_engine *
net/pms/configuration/.svn/text-base/PmsConfiguration.java.svn-base
net/pms/configuration/PmsConfiguration.java


PmsConfiguration.java includes a line " private static final String KEY_HTTP_ENGINE_V2 = "http_engine_v2";" with a variable that's never again mentioned in the source

Code: Select all
$grep -iRal "http engine" *
CHANGELOG
documentation/.svn/text-base/general_configuration.html.svn-base
documentation/general_configuration.html
net/pms/.svn/text-base/messages.properties.svn-base
net/pms/.svn/text-base/messages_br.properties.svn-base
net/pms/.svn/text-base/messages_de.properties.svn-base
net/pms/.svn/text-base/messages_it.properties.svn-base
net/pms/.svn/text-base/messages_nl.properties.svn-base
net/pms/messages.properties
net/pms/messages_br.properties
net/pms/messages_de.properties
net/pms/messages_it.properties
net/pms/messages_nl.properties


(i.e. Only GUI-related messages).
Dave114
 
Posts: 12
Joined: Sat Sep 24, 2011 12:31 pm

Re: IP filtering for multiple IPs

Postby Raptor399 » Sun Sep 25, 2011 6:29 am

HTTPv2 uses Channels that automatically fire an event when a request arrives.
In HttpServerPipelineFactory.java you'll see the pipeline being constructed with RequestHandlerV2 kicking in to actually handle the request.

The Javadoc on Channels is pretty good, you can read up from there.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: IP filtering for multiple IPs

Postby renszarv » Fri Sep 30, 2011 10:22 pm

I've implemented IP filtering for both of the engines, it's in my git repo :
https://github.com/gzsombor/ps3mediaser ... a6750f7b8b
renszarv
Project Member
 
Posts: 105
Joined: Sun Aug 21, 2011 7:37 pm


Return to Developers

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests