hulu-automuter 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/NOTES CHANGED
@@ -215,3 +215,59 @@ loaded .bash_aliases
215
215
  [choi spartan~]$ osascript -e "set Volume output volume 10"
216
216
  [choi spartan~]$ osascript -e "set Volume output volume 60"
217
217
 
218
+
219
+
220
+
221
+
222
+ Adblock not working on Hulu
223
+ https://adblockplus.org/forum/viewtopic.php?t=7839
224
+
225
+
226
+ If request size is too large:
227
+
228
+ http://railsforum.com/viewtopic.php?id=40426
229
+
230
+ http://fossplanet.com/f14/ruby-webrick-httpproxy-headers-25742/
231
+
232
+
233
+
234
+ Youtube
235
+
236
+ - -> http://tc.v4.cache8.c.youtube.com/videoplayback?fexp=909318%2C902310%2C910207&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0hQRVdSUl9FSkNOMF9PTFZF&algorithm=throttle-factor&itag=34&id=4a5f4630e4daaad7&sver=3&expire=1310774400&factor=1.25&ipbits=0&burst=40&ip=0.0.0.0&key=yt1&signature=066D829E1D44F2D92AA0DA4862DB35C791FD79CF.47D9667B89783163E058E684B83A8CE22752B5F5&playretry=1
237
+
238
+
239
+
240
+ - -> http://s.youtube.com/s?erc=1&playerw=640&rt=53.304&screenw=1280&playerh=363&fmt=34&nsivblmax=2.080&scoville=1&len=87&hbd=4863116&vid=RtFXzoyMAA6wbXmfpjysGeujvCpwwdQ7C&fs=0&et=0.093&st=0.093&nsivbblmin=66588.000&ahoffset=27&fv=LNX%2010%2C3%2C181%2C34&vq=auto&nsipbps=78678.15860215054&h=360&sdetail=f%3Atopvideos_music%2Cp%3A%2F&hbt=15.336&playback=1&plid=AASoHqghqjCK9axK&decoding=&feature=topvideos_music&w=480&sourceid=y&fexp=910207,909318,902310&nsivblc=1&smoothing=1&bc=5332806&nsivblmin=2.080&rendering=software&docid=Sl9GMOTaqtc&nsivbblmax=66588.000&nsiablmax=2.020&csipt=watch&cr=US&nsivblmean=2.080&hl=en_US&nsiablmin=2.020&nsiabblmean=35603.000&el=detailpage&nsivbblmean=66588.000&nsiablmean=2.020&nsiabblc=1&nsiablc=1&nsiabblmin=35603.000&cfps=0&nsiabblmax=35603.000&referrer=http%3A%2F%2Fwww.youtube.com%2F&nsivbblc=1&screenh=800&ns=yt
241
+
242
+
243
+ Youtube errors
244
+
245
+
246
+
247
+ [2011-07-15 13:10:30] ERROR WEBrick::HTTPStatus::RequestURITooLarge
248
+ [2011-07-15 13:10:30] ERROR TypeError: can't convert nil into an exact number
249
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/accesslog.rb:42:in `-'
250
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/accesslog.rb:42:in `setup_params'
251
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:164:in `access_log'
252
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:87:in `run'
253
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
254
+ [2011-07-15 13:10:30] ERROR WEBrick::HTTPStatus::RequestURITooLarge
255
+ [2011-07-15 13:10:30] ERROR TypeError: can't convert nil into an exact number
256
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/accesslog.rb:42:in `-'
257
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/accesslog.rb:42:in `setup_params'
258
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:164:in `access_log'
259
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:87:in `run'
260
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
261
+ [2011-07-15 13:10:30] ERROR WEBrick::HTTPStatus::RequestURITooLarge
262
+ [2011-07-15 13:10:30] ERROR TypeError: can't convert nil into an exact number
263
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/accesslog.rb:42:in `-'
264
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/accesslog.rb:42:in `setup_params'
265
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:164:in `access_log'
266
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:87:in `run'
267
+ /home/choi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
268
+ /csi
269
+ /ad/l/1
270
+
271
+
272
+
273
+
data/README.markdown CHANGED
@@ -9,7 +9,9 @@ at Hulu.com.
9
9
  Benefits:
10
10
 
11
11
  * You won't have to manually toggle your sound to mute those awesome commercials
12
- * The sound comes back on right on cue
12
+ * When ads are finished, the sound comes back on right on cue
13
+ * Hulu ads are often miscalibrated and way too loud -- but not with the Automuter
14
+ * If you see an ad that looks interesting, just unmute your volume
13
15
  * Hulu still gets their ad impressions registered: it's as if you paid attention to them
14
16
 
15
17
 
@@ -22,6 +24,8 @@ Benefits:
22
24
 
23
25
  ## Install
24
26
 
27
+ Open a terminal, and type the following:
28
+
25
29
  gem install hulu-automuter
26
30
 
27
31
  Confirm that the installation succeeded by typing `hulu-automuter -h`. If you
@@ -33,6 +37,9 @@ have a `PATH` issue. Try one of these workarounds:
33
37
 
34
38
  To upgrade Hulu Automuter to a newer version, just repeat the installation procedure.
35
39
 
40
+ **Mac Wrapper App:** Some people have requested a Mac OS X wrapper app for
41
+ this, for users who are intimidated by the Unix command line. This wrapper app
42
+ should be available by the end of this week, and it will be free.
36
43
 
37
44
  ## Usage
38
45
 
@@ -74,11 +81,33 @@ browsing, try one of these tips:
74
81
  [polipo]: http://www.pps.jussieu.fr/~jch/software/polipo/
75
82
  [privoxy]: http://www.privoxy.org/
76
83
 
77
- There are also sure to be scripts out there that let you change your HTTP proxy
78
- settings from the command line. If you know of one, feel free to add it to the
84
+ There are scripts and extensions out there that let you change your HTTP proxy
85
+ settings more easily.
86
+
87
+ * [Proxy Switchy][switchy] for Google Chrome
88
+
89
+ [switchy]: https://chrome.google.com/webstore/detail/caehdcpeofiiigpdhbabniblemipncjj
90
+
91
+ If you know of more, feel free to let me know, or add it to the
79
92
  [wiki](https://github.com/danchoi/hulu_automuter/wiki).
80
93
 
81
94
 
95
+ ## Is it unfair to Hulu?
96
+
97
+ A good question.
98
+
99
+ Let me point you to a [blog post by Doc Searls][doc] on the topic.
100
+
101
+ [doc]:http://blogs.law.harvard.edu/doc/2007/08/09/looking-toward-life-beyond-advertising/
102
+
103
+ Being forced to watch ads you aren't interested in degrades the whole
104
+ experience of watching a good TV show or movie. It's an wasteful use
105
+ of everyone's time and mental bandwith.
106
+
107
+ We need a new system. I would rather pay per view or donate money directly to
108
+ the shows I enjoy, if Hulu gave that option.
109
+
110
+
82
111
  ## Bug reports and feature requests
83
112
 
84
113
  Please submit these at either of these places:
data/Rakefile CHANGED
@@ -38,7 +38,7 @@ end
38
38
  desc "build webpage"
39
39
  task :build_webpage do
40
40
  `cp README.markdown ../project-webpages/src/hulu_automuter.README.markdown`
41
- # `cp coverage.markdown ../project-webpages/src/hulu_automuter.coverage.markdown`
41
+ `cp coverage.markdown ../project-webpages/src/hulu_automuter.coverage.markdown`
42
42
  Dir.chdir "../project-webpages" do
43
43
  puts `ruby gen.rb hulu_automuter #{HuluAutomuter::VERSION}`
44
44
  `open out/hulu_automuter.html`
data/bin/hulu-automuter CHANGED
@@ -88,11 +88,12 @@ hc = case RUBY_PLATFORM
88
88
 
89
89
  proxyproc = Proc.new{|req,res|
90
90
  r = req.path
91
+ puts r
91
92
  next unless req.host =~ /hulu\.com/
92
- if r =~ /adload/
93
+ if r =~ /adload/ || r =~ /revenue\/request/ || r =~ /adstartvolume=/
93
94
  $stdout.puts ["ad loaded", hc.mute].join(', ')
94
95
  `#{hc.mute}`
95
- elsif r =~ /contentplaybackresume/
96
+ elsif r =~ /contentplaybackresume/ || r =~ /playback\/start/ || r =~ /continousplay/
96
97
  $stdout.puts ["content resuming", hc.unmute].join(', ')
97
98
  `#{hc.unmute}`
98
99
  end
data/coverage.markdown ADDED
@@ -0,0 +1,2 @@
1
+ * [reddit](http://www.reddit.com/r/apple/comments/inj3b/hulu_automuter_automatically_mutes_your_computer/)
2
+ * [hacker news](http://news.ycombinator.com/item?id=2755170)
data/lib/debug_proxy.rb CHANGED
@@ -4,6 +4,30 @@
4
4
 
5
5
  port = 8123
6
6
  require 'webrick/httpproxy'
7
+ require 'timeout'
8
+
9
+
10
+ puts RUBY_VERSION
11
+ module WEBrick
12
+ class HTTPRequest
13
+ def read_request_line(socket)
14
+ @request_line = read_line(socket, 2048) if socket
15
+ if @request_line.bytesize >= 2048 and @request_line[-1, 1] != LF
16
+ raise HTTPStatus::RequestURITooLarge
17
+ end
18
+ @request_time = Time.now
19
+ raise HTTPStatus::EOFError unless @request_line
20
+ if /^(\S+)\s+(\S++)(?:\s+HTTP\/(\d+\.\d+))?\r?\n/mo =~ @request_line
21
+ @request_method = $1
22
+ @unparsed_uri = $2
23
+ @http_version = HTTPVersion.new($3 ? $3 : "0.9")
24
+ else
25
+ rl = @request_line.sub(/\x0d?\x0a\z/o, '')
26
+ raise HTTPStatus::BadRequest, "bad Request-Line `#{rl}'."
27
+ end
28
+ end
29
+ end
30
+ end
7
31
 
8
32
  proxyproc = Proc.new{|req,res|
9
33
  puts req.path
@@ -14,7 +38,15 @@ proxyproc = Proc.new{|req,res|
14
38
  s = WEBrick::HTTPProxyServer.new(:Port => port,
15
39
  :BindAddress => '0.0.0.0',
16
40
  :RequestCallback => proxyproc)
17
- trap("INT"){s.shutdown}
41
+ trap("INT"){
42
+ begin
43
+ Timeout::timeout(10) do
44
+ s.shutdown
45
+ end
46
+ rescue
47
+ puts "Exited abnormally"
48
+ end
49
+ }
18
50
  puts "starting"
19
51
  s.start
20
52
 
@@ -1,3 +1,3 @@
1
1
  module HuluAutomuter
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
@@ -0,0 +1,632 @@
1
+ #Calomel.org RSS Feed
2
+
3
+ calomel.org
4
+
5
+ ____________________ Search Calomel.org
6
+
7
+ Proxy Auto Config for Firefox (PAC)
8
+
9
+ Calomel.org Home Page RSS Feed
10
+ A PAC file is a set of instructions telling a client browser what paths
11
+ to take when a certain condition are met. You could direct a internal
12
+ browser to use a proxy server to access certain restricted internal
13
+ websites for example. You can also filter URLs and use the PAC file as
14
+ a simple anti-ad or anti-porn filter redirecting filtered URLs to
15
+ localhost.
16
+
17
+ Why would I need a proxy auto config (PAC) file? How can it help me?
18
+
19
+ Controlling how users across an organization connect to the Internet
20
+ and intranets can be a tricky task to administer. You could have
21
+ clients at different physical locations which all need to traverse
22
+ different proxies, internal sites you need them to access directly or
23
+ roaming users who sometimes work from their own connections at home.
24
+
25
+ If you're looking to block on-line site ads and offensive Web content,
26
+ you don't need to buy special software -- instead, you can use a PAC
27
+ file for any browser. Few web sites host their own banner ads.
28
+ Typically they sign up with ad servers that deliver content and track
29
+ views and clicks. Thus you can block most web site ads by blocking a
30
+ fairly limited number of ad servers. You can also block other sites
31
+ serving objectionable content.
32
+
33
+ This is where a PAC (proxy auto config and sometime referred to as a
34
+ proxy access control) file comes in. With this one file you can control
35
+ how all of your clients access the web. Most of the modern browsers
36
+ will use a PAC file without any problems.
37
+
38
+ A proxy auto-config (PAC) file defines how web browsers and other
39
+ user agents can automatically choose the appropriate proxy server
40
+ (access method) for fetching a given URL.
41
+
42
+ A PAC file contains a JavaScript function "FindProxyForURL(url,
43
+ host)". This function returns a string with one or more access
44
+ method specifications. These specifications cause the user agent to
45
+ use a particular proxy server or to connect directly.
46
+
47
+ Multiple specifications provide a fallback when a proxy fails to
48
+ respond. The browser fetches this PAC file before retrieving other
49
+ pages. The URL of the PAC file is either configured manually or
50
+ determined automatically by the Web Proxy Autodiscovery Protocol.
51
+ Wikipedia Proxy Auto Config
52
+
53
+ Proxy Automatic Configuration (PAC) files were introduced by Netscape
54
+ with the release of JavaScript back in 1996, and all modern browsers
55
+ support them, including Firefox, Internet Explorer and Opera. PAC files
56
+ consist of JavaScript defining the function FindProxyForURL(url, host),
57
+ and are saved with the file type .pac. The return value for this
58
+ function says whether to use a proxy for this URL, a SOCKS proxy, or
59
+ connect directly. If your browser is configured to use a PAC file, the
60
+ FindProxyForURL function is called every time your browser attempts to
61
+ access a URL, even if JavaScript is turned off in your browser.
62
+
63
+ Lets take a look at a few examples.
64
+
65
+ Example 1: Simple proxy
66
+
67
+ This is the simplest PAC file. It will direct the client to use the
68
+ proxy server (proxy = "PROXY 192.168.1.100:8080") when they try to
69
+ access the URL "*.domain.home" or "*.whatsmyip.org". Any other URL
70
+ requests would be directly requested without the use of a proxy server.
71
+ You are welcome to copy-paste this example.
72
+ // Calomel.org Proxy Auto-Config
73
+ //
74
+
75
+ //
76
+ // Define the network paths (direct, proxy and deny)
77
+ //
78
+
79
+ // Default connection
80
+ var direct = "DIRECT";
81
+
82
+ // Alternate Proxy Server
83
+ var proxy = "PROXY 192.168.1.100:8080";
84
+
85
+ // Default localhost for denied connections
86
+ var deny = "PROXY 127.0.0.1:65535";
87
+
88
+ //
89
+ // Proxy Logic
90
+ //
91
+
92
+ function FindProxyForURL(url, host)
93
+ {
94
+
95
+ // Use Proxy?
96
+ if (dnsDomainIs(host, ".domain.home")
97
+ || dnsDomainIs(host, ".whatsmyip.org"))
98
+ { return proxy; }
99
+ else
100
+ { return direct; }
101
+
102
+ // Default DENY
103
+ { return deny; }
104
+
105
+ }
106
+
107
+ Example 2: Block Ads and Porn with a Proxy Auto-Config PAC file
108
+
109
+ This PAC files builds upon the first example. Clients will be directed
110
+ the proxy server (proxy = "PROXY 192.168.1.100:8080") when they try to
111
+ access the URL "*.domain.home" or "*.whatsmyip.org" and any other URL
112
+ requests would be directly requested. We then add the ability to deny
113
+ access to URL we do not want the client to access.
114
+
115
+ In this example we also have a long list of AD and adult sites we do
116
+ not want our users to access. When a URL listed in the "Anti-ads and
117
+ Anti-Porn" section is called on the request is redirected to localhost
118
+ port 65535. In essence the request will always fail and the browser
119
+ will immediately get a tcp reset. You are welcome to copy-paste this
120
+ example.
121
+ // Calomel.org Proxy Auto-Config
122
+ //
123
+
124
+ //
125
+ // Define the network paths (direct, proxy and deny)
126
+ //
127
+
128
+ // Default connection
129
+ var direct = "DIRECT";
130
+
131
+ // Alternate Proxy Server
132
+ var proxy = "PROXY 192.168.1.100:8080";
133
+
134
+ // Default localhost for denied connections
135
+ var deny = "PROXY 127.0.0.1:65535";
136
+
137
+ //
138
+ // Proxy Logic
139
+ //
140
+
141
+ function FindProxyForURL(url, host)
142
+ {
143
+
144
+ // Use Proxy?
145
+ if (dnsDomainIs(host, ".domain.home")
146
+ || dnsDomainIs(host, ".whatsmyip.org"))
147
+ { return proxy; }
148
+
149
+ // Anti-ads and Anti-porn
150
+ if (dnsDomainIs(host, ".doubleclick.com")
151
+ || dnsDomainIs(host, ".doubleclick.net")
152
+ || dnsDomainIs(host, ".googlesyndication.com")
153
+ || dnsDomainIs(host, "google-analytics.com")
154
+ || dnsDomainIs(host, ".rpts.net")
155
+ || dnsDomainIs(host, ".crossmediaservices.com")
156
+ || dnsDomainIs(host, ".safeclick.com")
157
+ || dnsDomainIs(host, ".2mdn.net")
158
+ || dnsDomainIs(host, ".2mdn.com")
159
+ || dnsDomainIs(host, ".globaltrack.com")
160
+ || dnsDomainIs(host, ".burstnet.com")
161
+ || dnsDomainIs(host, ".adbureau.net")
162
+ || dnsDomainIs(host, ".targetnet.com")
163
+ || dnsDomainIs(host, ".humanclick.com")
164
+ || dnsDomainIs(host, ".linkexchange.com")
165
+ || dnsDomainIs(host, ".fastclick.com")
166
+ || dnsDomainIs(host, ".fastclick.net")
167
+ || dnsDomainIs(host, ".admonitor.com")
168
+ || dnsDomainIs(host, ".focalink.com")
169
+ || dnsDomainIs(host, ".websponsors.com")
170
+ || dnsDomainIs(host, ".advertising.com")
171
+ || dnsDomainIs(host, ".cybereps.com")
172
+ || dnsDomainIs(host, ".postmasterdirect.com")
173
+ || dnsDomainIs(host, ".mediaplex.com")
174
+ || dnsDomainIs(host, ".adtegrity.com")
175
+ || dnsDomainIs(host, ".bannerbank.ru")
176
+ || dnsDomainIs(host, ".bannerspace.com")
177
+ || dnsDomainIs(host, ".theadstop.com")
178
+ || dnsDomainIs(host, ".l90.com")
179
+ || dnsDomainIs(host, ".webconnect.net")
180
+ || dnsDomainIs(host, ".avenuea.com")
181
+ || dnsDomainIs(host, ".flycast.com")
182
+ || dnsDomainIs(host, ".engage.com")
183
+ || dnsDomainIs(host, ".imgis.com")
184
+ || dnsDomainIs(host, ".datais.com")
185
+ || dnsDomainIs(host, ".link4ads.com")
186
+ || dnsDomainIs(host, ".247media.com")
187
+ || dnsDomainIs(host, ".hightrafficads.com")
188
+ || dnsDomainIs(host, ".tribalfusion.com")
189
+ || dnsDomainIs(host, ".rightserve.net")
190
+ || dnsDomainIs(host, ".admaximize.com")
191
+ || dnsDomainIs(host, ".valueclick.com")
192
+ || dnsDomainIs(host, ".adlibris.se")
193
+ || dnsDomainIs(host, ".vibrantmedia.com")
194
+ || dnsDomainIs(host, ".coremetrics.com")
195
+ || dnsDomainIs(host, ".vx2.cc")
196
+ || dnsDomainIs(host, ".webpower.com")
197
+ || dnsDomainIs(host, ".everyone.net")
198
+ || dnsDomainIs(host, ".zedo.com")
199
+ || dnsDomainIs(host, ".bigbangmedia.com")
200
+ || dnsDomainIs(host, ".ad-annex.com")
201
+ || dnsDomainIs(host, ".iwdirect.com")
202
+ || dnsDomainIs(host, ".adlink.de")
203
+ || dnsDomainIs(host, ".bidclix.net")
204
+ || dnsDomainIs(host, ".webclients.net")
205
+ || dnsDomainIs(host, ".linkcounter.com")
206
+ || dnsDomainIs(host, ".sitetracker.com")
207
+ || dnsDomainIs(host, ".adtrix.com")
208
+ || dnsDomainIs(host, ".netshelter.net")
209
+ || dnsDomainIs(host, ".rn11.com")
210
+ || dnsDomainIs(host, ".ru4.com")
211
+ || dnsDomainIs(host, "rightmedia.net")
212
+ || dnsDomainIs(host, ".casalemedia.com")
213
+ || dnsDomainIs(host, ".casalemedia.com")
214
+ || dnsDomainIs(host, "quantserve.com")
215
+ || dnsDomainIs(host, "crwdcntrl.net")
216
+ || dnsDomainIs(host, ".commission-junction.com")
217
+ || dnsDomainIs(host, ".qkimg.net")
218
+ || dnsDomainIs(host, ".bluestreak.com")
219
+ || dnsDomainIs(host, ".virtumundo.com")
220
+ || dnsDomainIs(host, ".treeloot.com")
221
+ || dnsDomainIs(host, ".memberprize.com")
222
+ || dnsDomainIs(host, ".internetfuel.net")
223
+ || dnsDomainIs(host, ".internetfuel.com")
224
+ || dnsDomainIs(host, ".peoplecaster.com")
225
+ || dnsDomainIs(host, ".cupidsdatabase.com")
226
+ || dnsDomainIs(host, ".automotive-times.com")
227
+ || dnsDomainIs(host, ".healthy-lifetimes.com")
228
+ || dnsDomainIs(host, ".us-world-business.com")
229
+ || dnsDomainIs(host, ".internet-2-web.com")
230
+ || dnsDomainIs(host, ".my-job-careers.com")
231
+ || dnsDomainIs(host, ".freeonline.com")
232
+ || dnsDomainIs(host, ".exitfuel.com")
233
+ || dnsDomainIs(host, ".netbroadcaster.com")
234
+ || dnsDomainIs(host, ".spaceports.com")
235
+ || dnsDomainIs(host, ".mircx.com")
236
+ || dnsDomainIs(host, ".exitchat.com")
237
+ || dnsDomainIs(host, ".atdmt.com")
238
+ || dnsDomainIs(host, ".partner2profit.com")
239
+ || dnsDomainIs(host, ".centrport.net")
240
+ || dnsDomainIs(host, ".centrport.com")
241
+ || dnsDomainIs(host, ".rampidads.com")
242
+ || dnsDomainIs(host, "commonwealth.riddler.com")
243
+ || dnsDomainIs(host, "banner.freeservers.com")
244
+ || dnsDomainIs(host, "usads.futurenet.com")
245
+ || dnsDomainIs(host, "banners.egroups.com")
246
+ || dnsDomainIs(host, "ngadclient.hearme.com")
247
+ || dnsDomainIs(host, "affiliates.allposters.com")
248
+ || dnsDomainIs(host, "adincl.go2net.com")
249
+ || dnsDomainIs(host, "webads.bizservers.com")
250
+ || dnsDomainIs(host, ".addserv.com")
251
+ || dnsDomainIs(host, ".falkag.net")
252
+ || dnsDomainIs(host, ".interclick.com")
253
+ || dnsDomainIs(host, ".atwola.com")
254
+ || dnsDomainIs(host, "toolbar.aol.com")
255
+ || dnsDomainIs(host, ".adsdk.com")
256
+ || dnsDomainIs(host, "remotead.cnet.com")
257
+ || dnsDomainIs(host, ".1st-dating.com")
258
+ || dnsDomainIs(host, ".mousebucks.com")
259
+ || dnsDomainIs(host, ".yourfreedvds.com")
260
+ || dnsDomainIs(host, ".popupsavings.com")
261
+ || dnsDomainIs(host, ".popupmoney.com")
262
+ || dnsDomainIs(host, ".popuptraffic.com")
263
+ || dnsDomainIs(host, ".popupnation.com")
264
+ || dnsDomainIs(host, ".infostart.com")
265
+ || dnsDomainIs(host, ".popupad.net")
266
+ || dnsDomainIs(host, ".usapromotravel.com")
267
+ || dnsDomainIs(host, ".goclick.com")
268
+ || dnsDomainIs(host, ".trafficwave.net")
269
+ || dnsDomainIs(host, ".popupad.net")
270
+ || dnsDomainIs(host, ".paypopup.com")
271
+ || dnsDomainIs(host, ".webtrendslive.com")
272
+ || dnsDomainIs(host, ".wtlive.com")
273
+ || dnsDomainIs(host, ".web-stat.com")
274
+ || dnsDomainIs(host, ".superstats.com")
275
+ || dnsDomainIs(host, ".allhits.ru")
276
+ || dnsDomainIs(host, ".list.ru")
277
+ || dnsDomainIs(host, ".counted.com")
278
+ || dnsDomainIs(host, ".rankyou.com")
279
+ || dnsDomainIs(host, ".clickcash.com")
280
+ || dnsDomainIs(host, ".clickbank.com")
281
+ || dnsDomainIs(host, ".paycounter.com")
282
+ || dnsDomainIs(host, ".cashcount.com")
283
+ || dnsDomainIs(host, ".clickedyclick.com")
284
+ || dnsDomainIs(host, ".clickxchange.com")
285
+ || dnsDomainIs(host, ".sitestats.com")
286
+ || dnsDomainIs(host, ".site-stats.com")
287
+ || dnsDomainIs(host, ".hitbox.com")
288
+ || dnsDomainIs(host, ".exitdirect.com")
289
+ || dnsDomainIs(host, ".realtracker.com")
290
+ || dnsDomainIs(host, ".etracking.com")
291
+ || dnsDomainIs(host, ".livestat.com")
292
+ || dnsDomainIs(host, ".spylog.com")
293
+ || dnsDomainIs(host, ".freestats.com")
294
+ || dnsDomainIs(host, ".addfreestats.com")
295
+ || dnsDomainIs(host, ".topclicks.net")
296
+ || dnsDomainIs(host, ".mystat.pl")
297
+ || dnsDomainIs(host, ".hitz4you.de")
298
+ || dnsDomainIs(host, ".hitslink.com")
299
+ || dnsDomainIs(host, ".thecounter.com")
300
+ || dnsDomainIs(host, ".roiservice.com")
301
+ || dnsDomainIs(host, ".overture.com")
302
+ || dnsDomainIs(host, ".xiti.com")
303
+ || dnsDomainIs(host, ".cj.com")
304
+ || dnsDomainIs(host, ".anrdoezrs.net")
305
+ || dnsDomainIs(host, ".hey.it")
306
+ || dnsDomainIs(host, ".ppctracking.net")
307
+ || dnsDomainIs(host, ".darkcounter.com")
308
+ || dnsDomainIs(host, ".2o7.com")
309
+ || dnsDomainIs(host, ".2o7.net")
310
+ || dnsDomainIs(host, ".gostats.com")
311
+ || dnsDomainIs(host, ".everstats.com")
312
+ || dnsDomainIs(host, ".onestat.com")
313
+ || dnsDomainIs(host, ".statcounter.com")
314
+ || dnsDomainIs(host, ".trafic.ro")
315
+ || dnsDomainIs(host, ".exitexchange.com")
316
+ || dnsDomainIs(host, "clicktorrent.info")
317
+ || dnsDomainIs(host, "ventimedia.com")
318
+ || dnsDomainIs(host, ".clickability.com")
319
+ || dnsDomainIs(host, ".savethis.com")
320
+ || dnsDomainIs(host, ".extremetracking.com")
321
+ || dnsDomainIs(host, ".extreme-dm.com")
322
+ || dnsDomainIs(host, ".netster.com")
323
+ || dnsDomainIs(host, ".searchmarketing.com")
324
+ || dnsDomainIs(host, ".friendgreetings.com")
325
+ || dnsDomainIs(host, ".permissionedmedia.com")
326
+ || dnsDomainIs(host, ".searchbarcash.com")
327
+ || dnsDomainIs(host, ".zoomerang.com")
328
+ || dnsDomainIs(host, ".quizrocket.com")
329
+ || dnsDomainIs(host, ".aceshigh.com")
330
+ || dnsDomainIs(host, ".idealcasino.net")
331
+ || dnsDomainIs(host, ".casinobar.net")
332
+ || dnsDomainIs(host, ".casinoionair.com")
333
+ || dnsDomainIs(host, ".licensed-collectibles.com")
334
+ || dnsDomainIs(host, ".webdesignprofessional.com")
335
+ || dnsDomainIs(host, ".offshoreclicks.com"))
336
+ { return deny; }
337
+ else
338
+ { return direct; }
339
+
340
+ // Default DENY
341
+ { return deny; }
342
+
343
+ }
344
+
345
+ How do configure my client to use the Proxy Auto-Config PAC file ?
346
+
347
+ First, you need to make a copy of the PAC file you want to use. Then
348
+ save it locally, lets say as calomel.pac. Just remember the path you
349
+ save the pac file to so you can enter that path into the browser config
350
+ as shown below.
351
+
352
+ NOTE: You can also put this pac file on a web server and have your
353
+ users retrieve it over the network. This method is significantly easier
354
+ to manage when you have more than just a few users.
355
+
356
+ Most modern browsers have the ability to use a proxy auto-config file.
357
+ Here are few examples of how to configure the Mozilla products.
358
+
359
+ Firefox v3.x or above: automatic proxy configuration URL:
360
+
361
+ To use a PAC file with Firefox use the following instructions:
362
+ 1. Edit
363
+ 2. Preferences
364
+ 3. Advanced
365
+ 4. Network (tab)
366
+ 5. Connection Settings (button)
367
+ 6. automatic proxy configuration URL:
368
+ 7. ... enter the file path or URL into the blank like
369
+ /tools/calomel.pac or http://example/calomel.pac
370
+
371
+ Firefox v2.x or above: automatic proxy configuration URL:
372
+
373
+ To use a PAC file with Firefox use the following instructions:
374
+ 1. Tools
375
+ 2. Options
376
+ 3. General
377
+ 4. Connection
378
+ 5. Connection Settings (button)
379
+ 6. ... enter the file path or URL into the blank like
380
+ /tools/calomel.pac or http://example/calomel.pac
381
+
382
+ SeaMonkey: automatic proxy configuration URL:
383
+
384
+ To use a PAC file with SeaMonkey use the following instructions:
385
+ 1. Edit
386
+ 2. Preferences
387
+ 3. Advanced
388
+ 4. Proxies
389
+ 5. ... enter the file path or URL into the blank like
390
+ /tools/calomel.pac or http://example/calomel.pac
391
+
392
+ Testing the PAC file
393
+
394
+ Now that you have a PAC file you can save it locally or publish it to
395
+ HTTP server accessible to your users.
396
+
397
+ If you are going to use the PAC file locally then just save it and make
398
+ note of the directory you place it in. For example, lets say you are
399
+ using the PAC file from example number 2 above and saved it to
400
+ /somedir/calomel.pac.
401
+
402
+ Or, you can put the file onto a HTTP server and serve out the PAC file
403
+ over the network. This is really helpful if you have more than just a
404
+ few users. Lets say the web server and file are called
405
+ http://homelan/calomel.pac.
406
+
407
+ Next, you would add the path into the "automatic proxy configuration
408
+ URL" in your browser.
409
+
410
+ Now, you need to goto a URL that will trigger a rule in the PAC file to
411
+ make sure it works. If you used "example 2" from above then you may
412
+ have notice that a URL containing the string "doubleclick" is denied.
413
+ Try to goto http://www.doubleclick.com/ and see if the connection is
414
+ denied. If so then the anti-ad rules are working.
415
+
416
+ That's about it. You can add more URLs or custom rules as needed. Just
417
+ make sure to test everything thoroughly. You do not want to DOS your
418
+ users due to a typo.
419
+
420
+ What Predefined and Environment Functions can be used in the PAC file ?
421
+
422
+ This is a listing with examples of the functions that you can use in
423
+ your own PAC files. Not all functions are supported by all browsers, so
424
+ it is best to test thoroughly before distributing your changes.
425
+
426
+ isPlainHostName(host)
427
+
428
+ * host the hostname from the URL (excluding port number).
429
+ * True if there is no domain name in the hostname (no dots).
430
+
431
+ isPlainHostName("www")
432
+ is true.
433
+ isPlainHostName("www.example.com")
434
+ is false.
435
+
436
+ dnsDomainIs(host, domain)
437
+
438
+ * host is the hostname from the URL
439
+ * domain is the domain name to test the hostname against.
440
+ * Returns true if the domain of hostname matches
441
+
442
+ dnsDomainIs("www.example.com", ".example.com")
443
+ is true.
444
+ dnsDomainIs("www", ".example.com")
445
+ is false.
446
+ dnsDomainIs("www.tcom.com", ".example.com")
447
+ is false.
448
+
449
+ localHostOrDomainIs(host, hostdom)
450
+
451
+ * host the hostname from the URL.
452
+ * hostdom fully qualified hostname to match against.
453
+ * Is true if the hostname matches exactly the specified hostname, or
454
+ if there is no domain name part in the hostname, but the
455
+ unqualified hostname matches.
456
+
457
+ localHostOrDomainIs("www.example.com", "www.example.com")
458
+ is true (exact match).
459
+ localHostOrDomainIs("www", "www.example.com")
460
+ is true (hostname match, domain not specified).
461
+ localHostOrDomainIs("www.mcom.com", "www.example.com")
462
+ is false (domain name mismatch).
463
+ localHostOrDomainIs("home.example.com", "www.example.com")
464
+ is false (hostname mismatch).
465
+
466
+ isResolvable(host)
467
+
468
+ * host is the hostname from the URL.
469
+ * Tries to resolve the hostname. Returns true if succeeds.
470
+
471
+ isResolvable("www.example.com")
472
+ is true (unless DNS fails to resolve it due to a firewall or some other reas
473
+ on).
474
+ isResolvable("bogus.domain.foobar")
475
+ is false.
476
+
477
+ isInNet(host, pattern, mask)
478
+
479
+ * host a DNS hostname, or IP address. If a hostname is passed, it
480
+ will be resolved into an IP address by this function.
481
+ * pattern an IP address pattern in the dot-separated format
482
+ * mask for the IP address pattern informing which parts of the IP
483
+ address should be matched against. 0 means ignore, 255 means match.
484
+ * True if the IP address of the host matches the specified IP address
485
+ pattern. Pattern and mask specification is done the same way as for
486
+ SOCKS configuration.
487
+
488
+ isInNet(host, "192.168.249.79", "255.255.255.255")
489
+ is true if the IP address of host matches exactly 192.168.249.79.
490
+ isInNet(host, "192.168.0.0", "255.255.0.0")
491
+ is true if the IP address of the host matches 192.168.*.*.
492
+
493
+ dnsResolve(host)
494
+
495
+ * host hostname to resolve
496
+ * Resolves the given DNS hostname into an IP address, and returns it
497
+ in the dot separated format as a string.
498
+
499
+ dnsResolve("home.example.com")
500
+ returns the string "192.168.249.79".
501
+
502
+ myIpAddress()
503
+
504
+ * Returns the IP address of the host that the Navigator is running
505
+ on, as a string in the dot-separated integer format.
506
+
507
+ myIpAddress()
508
+ would return the string "192.168.249.79" if you were running the Navigator o
509
+ n that host.
510
+
511
+ dnsDomainLevels(host)
512
+
513
+ * host is the hostname from the URL.
514
+ * Returns the number (integer) of DNS domain levels (number of dots)
515
+ in the hostname.
516
+
517
+ dnsDomainLevels("www")
518
+ returns 0.
519
+ dnsDomainLevels("www.example.com")
520
+ returns 2.
521
+
522
+ shExpMatch(str, shexp)
523
+
524
+ * str is any string to compare (e.g. the URL, or the hostname).
525
+ * shexp is a shell expression to compare against.
526
+ * Returns true if the string matches the specified shell expression.
527
+
528
+ shExpMatch("http://home.example.com/people/ari/index.html", "*/ari/*")
529
+ is true.
530
+ shExpMatch("http://home.example.com/people/montulli/index.html", "*/ari/*")
531
+ is false.
532
+
533
+ weekdayRange(wd1, wd2, gmt)
534
+
535
+ * wd1 and wd2 are one of the weekday strings: SUN MON TUE WED THU FRI
536
+ SAT
537
+ * gmt is either the string: GMT or is left out.
538
+ * Only the first parameter is mandatory. Either the second, the
539
+ third, or both may be left out. If only one parameter is present,
540
+ the function yields a true value on the weekday that the parameter
541
+ represents. If the string "GMT" is specified as a second parameter,
542
+ times are taken to be in GMT, otherwise in local timezone. If both
543
+ wd1 and wd1 are defined, the condition is true if the current
544
+ weekday is in between those two weekdays. Bounds are inclusive. If
545
+ the "GMT" parameter is specified, times are taken to be in GMT,
546
+ otherwise the local timezone is used.
547
+
548
+ weekdayRange("MON", "FRI")
549
+ true Monday through Friday (local timezone).
550
+ weekdayRange("MON", "FRI", "GMT")
551
+ same as above, but GMT timezone.
552
+ weekdayRange("SAT")
553
+ true on Saturdays local time.
554
+ weekdayRange("SAT", "GMT")
555
+ true on Saturdays GMT time.
556
+ weekdayRange("FRI", "MON")
557
+ true Friday through Monday (note, order does matter!).
558
+
559
+ dateRange(day1, month1, day2, month2)
560
+
561
+ * day is the day of month between 1 and 31 (as an integer).
562
+ * month is one of the month strings: JAN FEB MAR APR MAY JUN JUL AUG
563
+ SEP OCT NOV DEC
564
+ * year is the full year number, for example 1995 (but not 95).
565
+ Integer.
566
+ * gmt is either the string "GMT", which makes time comparison occur
567
+ in GMT timezone; if left unspecified, times are taken to be in the
568
+ local timezone. Even though the above examples don't show, the
569
+ "GMT" parameter can be specified in any of the 9 different call
570
+ profiles, always as the last parameter.
571
+ * If only a single value is specified (from each category: day,
572
+ month, year), the function returns a true value only on days that
573
+ match that specification. If both values are specified, the result
574
+ is true between those times, including bounds.
575
+
576
+ dateRange(1)
577
+ true on the first day of each month, local timezone.
578
+ dateRange(1, "GMT")
579
+ true on the first day of each month, GMT timezone.
580
+ dateRange(1, 15)
581
+ true on the first half of each month.
582
+ dateRange(24, "DEC")
583
+ true on 24th of December each year.
584
+ dateRange(24, "DEC", 1995)
585
+ true on 24th of December, 1995.
586
+ dateRange("JAN", "MAR")
587
+ true on the first quarter of the year.
588
+ dateRange(1, "JUN", 15, "AUG")
589
+ true from June 1st until August 15th, each year (including June 1st and Augu
590
+ st 15th).
591
+ dateRange(1, "JUN", 15, 1995, "AUG", 1995)
592
+ true from June 1st, 1995, until August 15th, same year.
593
+ dateRange("OCT", 1995, "MAR", 1996)
594
+ true from October 1995 until March 1996 (including the entire month of Octob
595
+ er 1995 and March 1996).
596
+ dateRange(1995)
597
+ true during the entire year 1995.
598
+ dateRange(1995, 1997)
599
+ true from beginning of year 1995 until the end of year 1997.
600
+
601
+ timeRange(hour1, hour2)
602
+
603
+ * hour is the hour from 0 to 23. (0 is midnight, 23 is 11 pm.)
604
+ * min minutes from 0 to 59.
605
+ * sec seconds from 0 to 59.
606
+
607
+
608
+ timerange(12)
609
+ true from noon to 1pm.
610
+ timerange(12, 13)
611
+ same as above.
612
+ timerange(12, "GMT")
613
+ true from noon to 1pm, in GMT timezone.
614
+ timerange(9, 17)
615
+ true from 9am to 5pm.
616
+ timerange(8, 30, 17, 00)
617
+ true from 8:30am to 5:00pm.
618
+ timerange(0, 0, 0, 0, 0, 30)
619
+ true between midnight and 30 seconds past midnight.
620
+
621
+ Questions, comments, or suggestions? Contact Calomel.org
622
+ Calomel.org Home Page :: Open Source Research and Reference
623
+
624
+ calomel.org
625
+ http://feeds.feedburner.com/CalomelorgOpenSourceResearchAndReference
626
+ https://calomel.org/
627
+ https://calomel.org/
628
+ http://feeds.feedburner.com/CalomelorgOpenSourceResearchAndReference
629
+ http://en.wikipedia.org/wiki/Proxy_auto-config
630
+ https://calomel.org/calomel_at.html
631
+ https://calomel.org/
632
+ https://calomel.org/
metadata CHANGED
@@ -1,68 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hulu-automuter
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
4
5
  prerelease:
5
- version: 0.0.5
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Daniel Choi
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-12 00:00:00 -04:00
14
- default_executable:
12
+ date: 2011-07-28 00:00:00.000000000Z
15
13
  dependencies: []
16
-
17
14
  description: Auto-mute Hulu commericials
18
- email:
15
+ email:
19
16
  - dhchoi@gmail.com
20
- executables:
17
+ executables:
21
18
  - hulu-automuter
22
19
  extensions: []
23
-
24
20
  extra_rdoc_files: []
25
-
26
- files:
21
+ files:
27
22
  - .gitignore
28
23
  - NOTES
29
24
  - README.markdown
30
25
  - Rakefile
31
26
  - bin/hulu-automuter
27
+ - coverage.markdown
32
28
  - hulu_automuter.gemspec
33
29
  - lib/debug_proxy.rb
34
30
  - lib/hulu_automuter/version.rb
31
+ - proxy_auto_config.txt
35
32
  - screens/hulu1-sm.png
36
33
  - screens/hulu1.png
37
34
  - screens/hulu2-sm.png
38
35
  - screens/hulu2.png
39
- has_rdoc: true
40
36
  homepage: http://danielchoi.com/software/hulu_automuter.html
41
37
  licenses: []
42
-
43
38
  post_install_message:
44
39
  rdoc_options: []
45
-
46
- require_paths:
40
+ require_paths:
47
41
  - lib
48
- required_ruby_version: !ruby/object:Gem::Requirement
42
+ required_ruby_version: !ruby/object:Gem::Requirement
49
43
  none: false
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
53
47
  version: 1.8.6
54
- required_rubygems_version: !ruby/object:Gem::Requirement
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
49
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
60
54
  requirements: []
61
-
62
55
  rubyforge_project: hulu_automuter
63
- rubygems_version: 1.6.1
56
+ rubygems_version: 1.8.6
64
57
  signing_key:
65
58
  specification_version: 3
66
59
  summary: Auto-mute Hulu commericials
67
60
  test_files: []
68
-