Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[IDEA] proxy server with .pac
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Idea: proxy server with .pac
15th Jan, 2013, 11:34 AM
Post: #1
p4trykx Offline
Registered
Posts: 15
Joined: Dec 2012
Reputation: 1
proxy server with .pac
Hello
There is a nice Firefox addon called Media Hint which basically usese special rules for proxy to fool Hulu or Pandora that you are in the USA.
The trick is to use proxy just for those reqests that check the geolocation and the main traffic does not use proxy. This is much faster.
Unfortunatley XBMC does not support using .pac file
http://en.wikipedia.org/wiki/Proxy_auto-config

I wonder if there is a way to set up some proxy server on xbian which will handle the rules.
Find all posts by this user
Quote this message in a reply
25th Jan, 2013, 11:44 PM
Post: #2
Koenkk Offline
Registered
Posts: 1,238
Joined: Dec 2012
Reputation: 112
RE: proxy server with .pac
You could try SQUID. http://www.skullbox.net/squid.php

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
12th Nov, 2014, 11:34 PM
Post: #3
psyLord Offline
Registered
Posts: 22
Joined: Aug 2014
Reputation: 0
RE: proxy server with .pac
Does someone tried SQUID? And does it works for this purpose?

I'm also searching for a solution to use a pac file in XBMC or for the whole system for only specific connections. I want to avoid a system wide proxy for all connections. Does someone has a solution for this?

(My idea is to use the pac file that is working fine with firefox to unblock Grooveshark. Maybe there is another way to use a grooveshark plugin in restricted countries?)
Find all posts by this user
Quote this message in a reply
15th Nov, 2014, 10:51 PM
Post: #4
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: proxy server with .pac
@psyLord

SQUID works with XBMC, although on most video streaming sites you will find that moving through the video (skip +30s, 10min) is no longer working.

back in time when I was trying that I found that this wasn't misconfiguration, but simply the way how that works (and SQUID in between). but I also found some special enhancements to squid (.conf and scripts) to handle full media experience, but never tried.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
24th Nov, 2014, 08:31 PM
Post: #5
psyLord Offline
Registered
Posts: 22
Joined: Aug 2014
Reputation: 0
RE: proxy server with .pac
Thanks for your answer mk01.

Then I will look into SQUID and will try to configure it.
Find all posts by this user
Quote this message in a reply
5th Dec, 2014, 10:26 AM
Post: #6
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: proxy server with .pac
if you configure squid to act as transparent proxy too, you can handle .pac at squid (and zero config at clients).

now when I think retrospectively, that kind of squid usage (as transparent proxy) is creating that additional load on configuration (for media webs proxying).

different approach:
https://code.google.com/p/libproxy/

very small and VERY easy to use in existing code. I will check current XBMC calls (to proxy) whether it is under 1h to implement. then we can release a patch which would make XBMC understand .pac file as "proxy server".

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
8th Dec, 2014, 08:58 PM
Post: #7
psyLord Offline
Registered
Posts: 22
Joined: Aug 2014
Reputation: 0
RE: proxy server with .pac
(5th Dec, 2014 10:26 AM)mk01 Wrote:  if you configure squid to act as transparent proxy too, you can handle .pac at squid (and zero config at clients).

now when I think retrospectively, that kind of squid usage (as transparent proxy) is creating that additional load on configuration (for media webs proxying).

different approach:
https://code.google.com/p/libproxy/

very small and VERY easy to use in existing code. I will check current XBMC calls (to proxy) whether it is under 1h to implement. then we can release a patch which would make XBMC understand .pac file as "proxy server".

That would be nice. I hope the implementing time will be under 1h and you can manage the it Smile
Find all posts by this user
Quote this message in a reply
16th Dec, 2014, 02:58 PM
Post: #8
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: proxy server with .pac
@psyLord

I realised libproxy package is part of debian main apt so just do
apt-get install libproxy libproxy-plugin*

currently I found not the xbmc source biggest problem - this I have done already. but I'm not able to succeed with libproxy as is. by default it provides the usual auto proxy discovery - to find .pac somewhere on the network. my macs (safari) work well with dns record "wpad" directing to http where is /wpad.dat file.

but libproxy seems to be ... not doing the job. in docs there is also notice that via mozjs (java script parser/engine) it is able to understand and read even local .pac files (file://) but I'm unable to find any reference HOW to specify it.

can you please check? no programming there, if you install libproxy-tools you will have "proxy" binary at hand which according to man should work like:

echo http://www.google.com | proxy

but I see in web logs wpad.dat is not accessed, in dns logs that wpad name is not checked so proxy returns always direct://.

anyhow the patch is here, currently it changes xbmc way of resolving (getting http) like this:
1) first autoproxy resolving is started via libproxy
2) if proxys are returned - XBMC internal setting is overwritten
3) otherwise that local setting is used
4) otherwise direct

the code alone works (as currently libproxy returns always direct://), so if you make libproxy work as it should it is done.
https://github.com/xbianonpi/xbian-package-xbmc/blob/master/patches/libproxy.patch

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
16th Dec, 2014, 06:35 PM
Post: #9
psyLord Offline
Registered
Posts: 22
Joined: Aug 2014
Reputation: 0
RE: proxy server with .pac
@mk01: I will check it when I'm back home after work.
Find all posts by this user
Quote this message in a reply
16th Dec, 2014, 09:05 PM
Post: #10
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: proxy server with .pac
@psyLord

no stress. ... take your time.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
21st Dec, 2014, 06:16 AM
Post: #11
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: proxy server with .pac
@psyLord

got it working. for now with .pac provided via http, but significant progress.
so I can start checking the xbmc implementation.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 08:13 PM Powered By MyBB, © 2002-2025 MyBB Group.