Skip to content

Instantly share code, notes, and snippets.

@knoajp
Last active December 25, 2022 05:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save knoajp/a387e510744c1a2239b0178149f8576b to your computer and use it in GitHub Desktop.
Save knoajp/a387e510744c1a2239b0178149f8576b to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host){
switch(true){
/*いまいましい音付き広告を拒否*/
case dnsDomainIs(host, '2mdn.net'):
case dnsDomainIs(host, 'cmertv.com'):
case dnsDomainIs(host, 'cxense.com'):
case dnsDomainIs(host, 'microad.jp'):
case dnsDomainIs(host, 'socdm.com'):
case dnsDomainIs(host, 'teads.tv'):
case dnsDomainIs(host, 'uliza.jp'):/*TVerのCMに使われるのでTVerを見るなら外す必要があるかも*/
case dnsDomainIs(host, 'impact-ad.jp'):/*uzila.jpとセットのトラッキングだろうか?*/
/*邪悪な広告やスクリプトを削除*/
case dnsDomainIs(host, 'adnxs.com'):
//case dnsDomainIs(host, 'cloudfront.net'):/*普通に大手で削除すると弊害が大きい*/
case dnsDomainIs(host, 'mathtag.com'):
case dnsDomainIs(host, 'trafficads.net'):/*2018/10/20 ついに話題の当選詐欺に遭遇*/
//case dnsDomainIs(host, 'creativecdn.com'):/*上記の巻き添えは食らわせたくないが*/
//case dnsDomainIs(host, 'gssprt.jp'):/*上記の巻き添えは食らわせたくないが*/
/*たまに応答のないスクリプトになるので*/
case dnsDomainIs(host, 'googlesyndication.com'):
/*ログを吐きまくるので*/
case dnsDomainIs(host, 'rfihub.net'):/*ad*/
case dnsDomainIs(host, 'fyber.com'):/*ad*/
/*背景タブでもCPUを食うスクリプトを配信するので*/
case dnsDomainIs(host, 'facebook.net'):
//case dnsDomainIs(host, 'fbcdn.net'):/*facebook本体に支障が出る*/
//case dnsDomainIs(host, 'gstatic.com'):/*google検索に支障が出る*/
case dnsDomainIs(host, 'googletagmanager.com'):
case dnsDomainIs(host, 'mieru-ca.com'):/*SEO*/
case dnsDomainIs(host, 'nakanohito.jp'):/*analysis*/
case dnsDomainIs(host, 'popin.cc'):/*ad*/
case dnsDomainIs(host, 'logly.co.jp'):/*ad*/
case dnsDomainIs(host, 'doubleverify.com'):/*ad*/
case dnsDomainIs(host, 'linksynergy.com'):/*ad*/
/*Chromeを自動アップデートさせない*/
//case dnsDomainIs(host, 'google.com'):
//case dnsDomainIs(host, 'google.co.jp'):
return 'PROXY dummy';
/*問題なければ素通し*/
default:
return 'DIRECT';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment