Proxy Redirect

Redirect to privacy respecting proxy frontends

当前为 2024-09-03 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Proxy Redirect
  3. // @author Schimon Jehudah, Adv.
  4. // @collaborator hacker09
  5. // @collaborator Konf
  6. // @homepageURL https://greasyfork.org/scripts/465936-proxy-redirect
  7. // @supportURL https://greasyfork.org/scripts/465936-proxy-redirect/feedback
  8. // @copyright 2023 - 2024, Schimon Jehudah (http://schimon.i2p)
  9. // @license AGPL-3.0-only; https://www.gnu.org/licenses/agpl-3.0.en.html
  10. // @namespace i2p.schimon.proxy-redirect
  11. // @description Redirect to privacy respecting proxy frontends
  12. // @run-at document-start
  13. // @version 24.09.01
  14. // @grant GM.getValue
  15. // @grant GM.registerMenuCommand
  16. // @grant GM.setValue
  17. // @grant GM.xmlHttpRequest
  18. // @grant GM_xmlhttpRequest
  19. // @match file:///*
  20. // @match *://*/*
  21. // @exclude *#noredirect
  22. // @exclude *#nr
  23. // @connect 0011.lt
  24. // @connect 076.ne.jp
  25. // @connect 1search.i2p
  26. // @connect 1d4.us
  27. // @connect 2syis2nnyytz6jnusnjurva4swlaizlnleiks5mjp46phuwjbdjqwgqd.onion
  28. // @connect 40two.app
  29. // @connect 42l.fr
  30. // @connect absturztau.be
  31. // @connect actionsack.com
  32. // @connect adminforge.de
  33. // @connect albony.xyz
  34. // @connect artemislena.eu
  35. // @connect asynchronousexchange.com
  36. // @connect batsense.net
  37. // @connect bibliogram.art
  38. // @connect biblioreads.ga
  39. // @connect biblioreads.ml
  40. // @connect btdig.i2p
  41. // @connect btdig.com
  42. // @connect btdigggink2pdqzqrik3blmqemsbntpzwxottujilcdjfz56jumzfsyd.onion
  43. // @connect bus-hit.me
  44. // @connect cadence.moe
  45. // @connect catfluori.de
  46. // @connect cblgh.org
  47. // @connect censors.us
  48. // @connect chauvet.pro
  49. // @connect citizen4.eu
  50. // @connect cowfee.moe
  51. // @connect creller.net
  52. // @connect crewz.me
  53. // @connect cn.i2p
  54. // @connect datatunnel.xyz
  55. // @connect dcs0.hu
  56. // @connect domain.glass
  57. // @connect datura.network
  58. // @connect duckdns.org
  59. // @connect ducks.party
  60. // @connect dynabyte.ca
  61. // @connect ebnar.xyz
  62. // @connect envs.net
  63. // @connect esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion
  64. // @connect esmailelbob.xyz
  65. // @connect etsi.me
  66. // @connect exarius.org
  67. // @connect facilmap.org
  68. // @connect farside.link
  69. // @connect fdn.fr
  70. // @connect flokinet.to
  71. // @connect flux.industries
  72. // @connect fmac.xyz
  73. // @connect foss.wtf
  74. // @connect froth.zone
  75. // @connect gatti.ninja
  76. // @connect ggc-project.de
  77. // @connect ggtyler.dev
  78. // @connect gnu.style
  79. // @connect go.metastem.su
  80. // @connect grimneko.de
  81. // @connect hostux.net
  82. // @connect hxvy0.gq
  83. // @connect hyperborea.cloud
  84. // @connect iket.me
  85. // @connect il.ax
  86. // @connect incogniweb.net
  87. // @connect incogsnoo.com
  88. // @connect invak.id
  89. // @connect jamiethalacker.dev
  90. // @connect jeikobu.net
  91. // @connect jewtube.i2p
  92. // @connect jing.rocks
  93. // @connect josias.dev
  94. // @connect jpope.org
  95. // @connect k62ptris7p72aborr4zoanee7xai6wguucveptwgxs5vbgt7qzpq.b32.i2p
  96. // @connect kavin.rocks
  97. // @connect kittywi.re
  98. // @connect kylrth.com
  99. // @connect ledditqo2mxfvlgobxnlhrkq4dh34jss6evfkdkb2thlvy6dn4f4gpyd.onion
  100. // @connect libredd.it
  101. // @connect libreddit.de
  102. // @connect libreddit.eu.org
  103. // @connect libreddit.hu
  104. // @connect libreddit.nl
  105. // @connect lingva.ml
  106. // @connect lqs5fjmajyp7rvp4qvyubwofzi6d4imua7vs237rkc4m5qogitqwrgyd.onion
  107. // @connect lr.n8pjl.ca
  108. // @connect lunar.icu
  109. // @connect melmac.space
  110. // @connect mint.lgbt
  111. // @connect moeyy.cn
  112. // @connect moomoo.me
  113. // @connect mywire.org
  114. // @connect mdosch.de
  115. // @connect monocles.de
  116. // @connect neet.works
  117. // @connect neuters.de
  118. // @connect netlify.app
  119. // @connect ngn.tf
  120. // @connect nitter.hu
  121. // @connect nitter.it
  122. // @connect nitter.net
  123. // @connect nitter.one
  124. // @connect nixnet.services
  125. // @connect no-logs.com
  126. // @connect nogoo.me
  127. // @connect northboot.xyz
  128. // @connect nttr.stream
  129. // @connect ononoki.org
  130. // @connect ooguy.com
  131. // @connect openstreetmap.org
  132. // @connect osi.kr
  133. // @connect oversold.host
  134. // @connect owacon.moe
  135. // @connect pabloferreiro.es
  136. // @connect paulgo.io
  137. // @connect pavot.ca
  138. // @connect phreedom.club
  139. // @connect piped.video
  140. // @connect poketube.fun
  141. // @connect priv.au
  142. // @connect privacy.com.de
  143. // @connect private.coffee
  144. // @connect projectsegfau.lt
  145. // @connect procurx.pt
  146. // @connect prvcy.eu
  147. // @connect puffyan.us
  148. // @connect pussthecat.org
  149. // @connect qwik.i2p
  150. // @connect qwikxx2erhx6qrymued6ox2qkf2yeogjwypqvzoif4fqkljixasr6oid.onion
  151. // @connect r.nf
  152. // @connect r4fo.com
  153. // @connect rabbit-company.com
  154. // @connect rasp.fr
  155. // @connect reallyaweso.me
  156. // @connect resrv.org
  157. // @connect revvy.de
  158. // @connect riverside.rocks
  159. // @connect rtrace.io
  160. // @connect scribe.rip
  161. // @connect search.im-in.space
  162. // @connect search.zdechov.net
  163. // @connect searx.ankha.ac
  164. // @connect searx.be
  165. // @connect searx.ee
  166. // @connect searx.fi
  167. // @connect searx.ninja
  168. // @connect searx.ru
  169. // @connect sethforprivacy.com
  170. // @connect simplifiedprivacy.com
  171. // @connect simplytranslate.org
  172. // @connect smnz.de
  173. // @connect snopyta.org
  174. // @connect sny.sh
  175. // @connect some-things.org
  176. // @connect sp-codes.de
  177. // @connect spike.codes
  178. // @connect spjmllawtheisznfs7uryhxumin26ssv2draj7oope3ok3wuhy43eoyd.onion
  179. // @connect strongthany.cc
  180. // @connect stuehieyr.com
  181. // @connect sugoma.tk
  182. // @connect syncpundit.com
  183. // @connect teddit.i2p
  184. // @connect teddit.net
  185. // @connect tedditfyn6idalzso5wam5qd3kdtxoljjhbrbbx34q2xkcisvshuytad.onion
  186. // @connect theanonymouse.xyz
  187. // @connect tinfoil-hat.net
  188. // @connect tiekoetter.com
  189. // @connect tm4rwkeysv3zz3q5yacyr4rlmca2c4etkdobfvuqzt6vsfsu4weq.b32.i2p
  190. // @connect tokhmi.xyz
  191. // @connect totaldarkness.net
  192. // @connect trom.tf
  193. // @connect tromdienste.de
  194. // @connect tux.land
  195. // @connect tux.pizza
  196. // @connect tuxcloud.net
  197. // @connect tyil.nl
  198. // @connect unixfox.eu
  199. // @connect unofficialbird.com
  200. // @connect userscripts-mirror.org
  201. // @connect vernapl3lpo3huqdx3pjzxqgdgavxjlmdskbvejh2gfqgmjuyvxq.b32.i2p
  202. // @connect vernaqj2qr2pijpgvf3od6ssc3ulz3nv52gwr3hba5l6humuzmgq.b32.i2p
  203. // @connect vernmzgraj6aaoafmehupvtkkynpaa67rxcdj2kinwiy6konn6rq.b32.i2p
  204. // @connect vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion
  205. // @connect vern.cc
  206. // @connect vern.i2p
  207. // @connect voidnet.tech
  208. // @connect vojkovic.xyz
  209. // @connect voring.me
  210. // @connect walkx.org
  211. // @connect webheberg.info
  212. // @connect weblibre.org
  213. // @connect whatever.social
  214. // @connect whatevertinfoil.de
  215. // @connect wikiless.i2p
  216. // @connect wikiless.org
  217. // @connect winscloud.net
  218. // @connect yewtu.be
  219. // @connect yonalee.eu
  220. // @connect ytmous.i2p
  221. // @connect xanny.family
  222. // @connect yacy.iko.soy
  223. // @connect zackptg5.com
  224. // @connect zaggy.nl
  225. // @connect zhaocloud.net
  226. // @connect zzls.i2p
  227. // @connect zzls.xyz
  228. // @icon data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjRtbSIgaGVpZ2h0PSI2NG1tIiB2aWV3Qm94PSIwIDAgNjQgNjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRleHQgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZvbnQtd2VpZ2h0OjQwMDtmb250LXNpemU6MTkycHg7bGluZS1oZWlnaHQ6MDt0ZXh0LWluZGVudDowO3RleHQtYWxpZ246c3RhcnQ7dGV4dC1kZWNvcmF0aW9uLXN0eWxlOnNvbGlkO3RleHQtZGVjb3JhdGlvbi1jb2xvcjojMDAwO3dyaXRpbmctbW9kZTpsci10YjtkaXJlY3Rpb246bHRyO3RleHQtb3JpZW50YXRpb246bWl4ZWQ7ZG9taW5hbnQtYmFzZWxpbmU6YXV0bztiYXNlbGluZS1zaGlmdDpiYXNlbGluZTt0ZXh0LWFuY2hvcjpzdGFydDtzaGFwZS1wYWRkaW5nOjA7c2hhcGUtbWFyZ2luOjA7aW5saW5lLXNpemU6MDtvcGFjaXR5OjE7ZmlsbDojMDAwO2ZpbGwtb3BhY2l0eToxO3N0cm9rZS13aWR0aDoxLjI3OTgyO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOm1pdGVyO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hvZmZzZXQ6MDtzdHJva2Utb3BhY2l0eToxO3N0b3AtY29sb3I6IzAwMDtzdG9wLW9wYWNpdHk6MSIgeD0iMTcuMDA1MjQ1IiB5PSIzMS42NTg0MDUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00LjQzNjg1NjQgNDAuODk0OTQpIHNjYWxlKC4yNjQ1OCkiPjx0c3BhbiB4PSIxNy4wMDUyNDUiIHk9IjMxLjY1ODQwNSIgc3R5bGU9ImZvbnQtc2l6ZToxOTJweCI+8J+luDwvdHNwYW4+PC90ZXh0Pjwvc3ZnPgo=
  229. // ==/UserScript==
  230.  
  231. //TODO
  232.  
  233. // Display bar at top to enable redirection for current page when all instances are not enabled.
  234.  
  235. // Add https://www.qwant.com/maps/#map=9.00/XXX/YYY
  236.  
  237. //Rebrand: Open Redirect, Proxy Redirect
  238. //Rebrand: Freelink, LibreProxy, Libreproxy, Open Link, Proxy Direct, Proxy Link, Proxy Redirect
  239.  
  240. /*
  241.  
  242. FIXME"
  243.  
  244. Read settings from function pickURL
  245.  
  246. if (await GM.getValue('libreddit')) {
  247. proxyArray.push(proxy.libreddit)
  248. }
  249. if (await GM.getValue('teddit')) {
  250. proxyArray.push(proxy.teddit)
  251. }
  252. proxyArray = [proxy.libreddit, proxy.teddit];
  253.  
  254. urlArray = []
  255. if (await GM.getValue('libred')) {
  256. urlArray.concat(proxy.libred)
  257. }
  258.  
  259. NOTE
  260. This program was inspired by Farside project from Ben Busby
  261. For more information: https://farside.link
  262.  
  263. TODO
  264.  
  265. Add RDX https://rdx.overdevs.com/
  266.  
  267. Brand
  268. FreeDirector, Free Direct, FreeDirect.js
  269. Open Redirector, Open Redirect, Open Direct, OpenDirect.js
  270. Redirect.js, Redirect.user.js, Redirector.js
  271. UserDirect, UserRedirect
  272.  
  273. FIXME
  274. // @match *://*.imgur.com/*
  275. // @exclude *://i.*.imgur.com/*
  276.  
  277. FIXME RegEx
  278. // @exclude /*.medium\.com\/*\/(c|fit|v2)\/.*$/
  279.  
  280. */
  281.  
  282. // https://github.com/makyen
  283. // https://github.com/greasemonkey/greasemonkey/issues/3160#issuecomment-1456758080
  284. const gmXmlhttpRequest = typeof GM_xmlhttpRequest === 'function' ? GM_xmlhttpRequest : GM.xmlHttpRequest;
  285.  
  286. //const url = location.href;
  287.  
  288. const urlsMatchers = {
  289. 'exclude' : [
  290. {
  291. 'addr' : 'gist.github.com',
  292. 'host' : 'gist.github.com',
  293. 'path' : [],
  294. 'text' : ['View on GitHub'],
  295. },
  296. {
  297. 'addr' : 'github.com',
  298. 'host' : 'github.com',
  299. // not-href -> perhaps starts with, ends with and inclusive
  300. 'path' : [
  301. 'actions', 'archive', 'blame', 'blob', 'codespaces', 'collections',
  302. 'commit', 'compare', 'contribute', 'customer-stories', 'delete',
  303. 'discussions', 'edit', 'enterprise', 'events', 'features', 'files',
  304. 'graphs', 'issues', 'labels', 'login', 'marketplace', 'milestones',
  305. 'notifications', 'orgs', 'password_reset', 'pricing', 'projects', 'pull', 'pulse',
  306. 'releases', 'security', 'sessions', 'settings', 'signup', 'solutions',
  307. 'sponsors', 'tags', 'team', 'topics', 'tree', 'trending', 'wiki'
  308. ],
  309. 'text' : ['View on GitHub'],
  310. },
  311. {
  312. 'addr' : 'gitlab.com',
  313. 'host' : 'gitlab.com',
  314. 'path' : [
  315. 'activity', 'artifacts', 'boards', 'cadences', 'compare', 'commits', 'jobs',
  316. 'labels', 'merge_requests', 'network', 'path_locks', 'pipeline_schedules',
  317. 'pipelines', 'project_members', 'requirements_management', 'sign_in',
  318. 'starrers', 'subgroups', 'successful_verification', 'tags', 'test_cases',
  319. 'tree', 'uploads', 'wikis'
  320. ],
  321. },
  322. {
  323. 'addr' : 'imdb.com',
  324. 'host' : 'imdb.com',
  325. 'path' : ['reviews'],
  326. },
  327. {
  328. 'addr' : 'medium.com',
  329. 'host' : 'medium.com',
  330. 'path' : ['feed/', 'c/', 'fit/', 'format:', 'resize:fit:', 'v2/'],
  331. },
  332. {
  333. 'addr' : 'safereddit.com',
  334. 'host' : 'safereddit.com',
  335. 'path' : [''],
  336. },
  337. {
  338. 'addr' : 'stackoverflow.com/questions/',
  339. 'host' : 'stackoverflow.com',
  340. 'path' : ['tagged', 'users'], // /questions/tagged
  341. },
  342. {
  343. 'addr' : 'tiktok.com',
  344. 'host' : 'tiktok.com',
  345. 'path' : ['discover', 'playlist'],
  346. },
  347. {
  348. 'addr' : 'www.torrentdownload.info',
  349. 'host' : 'torrentdownload.info',
  350. 'path' : ['feed_latest', 'search?q='],
  351. },
  352. {
  353. 'addr' : 'torrentz.eu',
  354. 'host' : 'torrentz.eu',
  355. 'path' : ['search?f='],
  356. },
  357. {
  358. 'addr' : 'torrentz.me',
  359. 'host' : 'torrentz.me',
  360. 'path' : ['search?f='],
  361. },
  362. {
  363. 'addr' : 'torrentz2.eu',
  364. 'host' : 'torrentz2.eu',
  365. 'path' : ['search?f='],
  366. },
  367. {
  368. 'addr' : 'torrentz2.is',
  369. 'host' : 'torrentz2.is',
  370. 'path' : ['search?f='],
  371. },
  372. // {
  373. // 'addr' : 'youtube.com',
  374. // 'host' : 'youtube.com',
  375. // 'path' : ['users'],
  376. // 'text' : ['Watch on YouTube'],
  377. // }
  378. ], // hosts, paths and texts to exclude
  379.  
  380. 'includeByHostname' : [
  381. {
  382. 'addr' : 'bandcamp.com',
  383. 'host' : 'bandcamp.com',
  384. },
  385. {
  386. 'addr' : 'bilibili.com',
  387. 'host' : 'bilibili.com',
  388. },
  389. {
  390. 'addr' : 'fandom.com',
  391. 'host' : 'fandom.com',
  392. },
  393. {
  394. 'addr' : 'gist.github.com',
  395. 'host' : 'gist.github.com',
  396. },
  397. {
  398. 'addr' : 'github.com',
  399. 'host' : 'github.com',
  400. },
  401. {
  402. 'addr' : 'gitlab.com',
  403. 'host' : 'gitlab.com',
  404. },
  405. {
  406. 'addr' : 'goodreads.com',
  407. 'host' : 'goodreads.com',
  408. },
  409. {
  410. 'addr' : 'imdb.com',
  411. 'host' : 'imdb.com',
  412. },
  413. {
  414. 'addr' : 'imgur.com',
  415. 'host' : 'imgur.com',
  416. },
  417. {
  418. 'addr' : 'instructables.com',
  419. 'host' : 'instructables.com',
  420. },
  421. {
  422. 'addr' : 'instagram.com',
  423. 'host' : 'instagram.com',
  424. },
  425. {
  426. 'addr' : 'invidious-invidious.invidious.svc.cluster.local:3000',
  427. 'host' : 'invidious-invidious.invidious.svc.cluster.local:3000',
  428. },
  429. {
  430. 'addr' : 'medium.com',
  431. 'host' : 'medium.com',
  432. },
  433. {
  434. 'addr' : 'moovitapp.com',
  435. 'host' : 'moovitapp.com',
  436. },
  437. {
  438. 'addr' : 'odysee.com',
  439. 'host' : 'odysee.com',
  440. },
  441. {
  442. 'addr' : 'reddit.com',
  443. 'host' : 'reddit.com',
  444. },
  445. {
  446. 'addr' : 'old.reddit.com',
  447. 'host' : 'old.reddit.com',
  448. },
  449. {
  450. 'addr' : 'quora.com',
  451. 'host' : 'quora.com',
  452. },
  453. {
  454. 'addr' : 'reuters.com',
  455. 'host' : 'reuters.com',
  456. },
  457. {
  458. 'addr' : 'tiktok.com',
  459. 'host' : 'tiktok.com',
  460. },
  461. {
  462. 'addr' : 'www.torrentdownload.info',
  463. 'host' : 'torrentdownload.info',
  464. },
  465. {
  466. 'addr' : 'torrentz.eu',
  467. 'host' : 'torrentz.eu',
  468. },
  469. {
  470. 'addr' : 'torrentz.me',
  471. 'host' : 'torrentz.me',
  472. },
  473. {
  474. 'addr' : 'torrentz2.eu',
  475. 'host' : 'torrentz2.eu',
  476. },
  477. {
  478. 'addr' : 'torrentz2.is',
  479. 'host' : 'torrentz2.is',
  480. },
  481. {
  482. 'addr' : 'twitter.com',
  483. 'host' : 'twitter.com',
  484. },
  485. {
  486. 'addr' : 'urbandictionary.com',
  487. 'host' : 'urbandictionary.com',
  488. },
  489. {
  490. 'addr' : 'userscripts.org',
  491. 'host' : 'userscripts.org',
  492. },
  493. {
  494. 'addr' : 'wikimap.toolforge.org',
  495. 'host' : 'wikimap.toolforge.org',
  496. },
  497. {
  498. 'addr' : 'search.yahoo.co.jp',
  499. 'host' : 'yahoo.co.jp',
  500. },
  501. {
  502. 'addr' : 'youtu.be',
  503. 'host' : 'youtu.be',
  504. },
  505. {
  506. 'addr' : 'youtube.com',
  507. 'host' : 'youtube.com',
  508. },
  509. {
  510. 'addr' : 'x.com',
  511. 'host' : 'x.com',
  512. }
  513. ], // hosts to include
  514.  
  515. 'includeBySLD' : [
  516. {
  517. 'addr' : 'bandcamp.com',
  518. 'host' : 'bandcamp.com',
  519. },
  520. {
  521. 'addr' : 'medium.com',
  522. 'host' : 'medium.com',
  523. },
  524. {
  525. 'addr' : 'reddit.com', // old.reddit.com
  526. 'host' : 'reddit',
  527. },
  528. {
  529. 'addr' : 'tumblr.com',
  530. 'host' : 'tumblr',
  531. },
  532. {
  533. 'addr' : 'wikipedia.org',
  534. 'host' : 'wikipedia',
  535. },
  536. {
  537. 'addr' : 'x.com',
  538. 'host' : 'x.com',
  539. }
  540. ], // hosts to include by second-level-domain
  541.  
  542. 'includeByPathnameAndSLD' : [
  543. {
  544. 'addr' : 'google.com',
  545. 'host' : 'google',
  546. 'path' : ['search'],
  547. }
  548. ], // hosts to include by pathname and second-level-domain
  549.  
  550. 'includeByPathname' : [
  551. {
  552. 'addr' : 'bt4g.org/magnet/',
  553. 'host' : 'bt4g.org',
  554. 'path' : ['magnet'],
  555. },
  556. {
  557. 'addr' : 'bt4gprx.com/magnet/',
  558. 'host' : 'bt4gprx.com',
  559. 'path' : ['magnet'],
  560. },
  561. {
  562. 'addr' : 'bing.com/(maps|search)',
  563. 'host' : 'bing.com',
  564. 'path' : ['maps', 'search'],
  565. },
  566. {
  567. 'addr' : 'fandom.com/wiki',
  568. 'host' : 'fandom.com',
  569. 'path' : ['wiki'],
  570. },
  571. {
  572. 'addr' : 'google.com/maps',
  573. 'host' : 'google.com',
  574. 'path' : ['maps'],
  575. },
  576. // {
  577. // 'addr' : 'google.com/sorry',
  578. // 'host' : 'google.com',
  579. // 'path' : ['sorry'],
  580. // },
  581. {
  582. 'addr' : 'stackoverflow.com/questions/',
  583. 'host' : 'stackoverflow.com',
  584. 'path' : ['questions'],
  585. },
  586. {
  587. 'addr' : 'yahoo.com/search',
  588. 'host' : 'yahoo.com',
  589. 'path' : ['search'],
  590. },
  591. {
  592. 'addr' : '(www|ul).waze.com/(live-map|ul)',
  593. 'host' : 'waze.com',
  594. 'path' : ['live-map', 'ul'],
  595. },
  596. {
  597. 'addr' : 'yandex.com/(maps|search)',
  598. 'host' : 'yandex.com',
  599. 'path' : ['maps', 'search'],
  600. },
  601. // { // THIS PART OF CODE BELONGS TO FJYT
  602. // 'addr' : 'youtube-nocookie.com',
  603. // 'host' : 'youtube-nocookie.com',
  604. // 'path' : ['@', 'channel', 'watch'],
  605. // },
  606. // { // THIS PART OF CODE BELONGS TO FJYT
  607. // 'addr' : 'youtube.com',
  608. // 'host' : 'youtube.com',
  609. // 'path' : ['@', 'channel', 'watch'],
  610. // }
  611. ], // hosts to include by pathname
  612.  
  613. };
  614.  
  615. const proxy = {
  616. "4get": {
  617. "clearnet": [
  618. "https://4get.perennialte.ch"
  619. ],
  620. "i2p": [],
  621. "loki": [],
  622. "tor": [],
  623. "yggdrasil": []
  624. },
  625. "anonymousoverflow": {
  626. "clearnet": [
  627. "https://ao.phreedom.club",
  628. "https://overflow.hostux.net",
  629. "https://ao.foss.wtf",
  630. "https://ao.ngn.tf",
  631. "https://overflow.adminforge.de",
  632. "https://ao.bloat.cat",
  633. "https://overflow.reallyaweso.me",
  634. "https://overflow.lunar.icu",
  635. "https://anonymousoverflow.esmailelbob.xyz",
  636. "https://overflow.smnz.de",
  637. "https://ao.vern.cc",
  638. "https://code.whatever.social",
  639. "https://stackoverflow.vern.cc",
  640. "https://anonymousoverflow.vern.cc",
  641. "http://overflow.ducks.party",
  642. // "https://ao.bloatcat.tk",
  643. "https://se.chaotic.ninja",
  644. "https://anonymousoverflow.privacyfucking.rocks",
  645. "https://overflow.projectsegfau.lt",
  646. "https://anonoverflow.frontendfriendly.xyz",
  647. "https://overflow.perennialte.ch",
  648. "https://anonymousoverflow.privacyredirect.com",
  649. // "https://overflow.fascinated.cc",
  650. "https://ao.rootdo.com"
  651. ],
  652. "i2p": [
  653. "http://vernmzgraj6aaoafmehupvtkkynpaa67rxcdj2kinwiy6konn6rq.b32.i2p"
  654. ],
  655. "loki": [],
  656. "tor": [
  657. "http://anonymousoverflow.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion",
  658. "http://ao.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"
  659. ],
  660. "yggdrasil": [
  661. "http://[301:f69c:2017:b6b8::8]"
  662. ]
  663. },
  664. "bibliogram": {
  665. "clearnet": [
  666. "https://bib.actionsack.com",
  667. "https://bibliogram.art",
  668. "https://bibliogram.snopyta.org",
  669. "https://bibliogram.pussthecat.org",
  670. "https://bibliogram.1d4.us",
  671. "https://biblioreads.ducks.party",
  672. "https://insta.trom.tf",
  673. "https://bib.riverside.rocks",
  674. "https://bibliogram.esmailelbob.xyz",
  675. "https://insta.privacy.com.de",
  676. "https://bibliogram.privacy.com.de",
  677. "https://bibliogram.domain.glass",
  678. "https://bibliogram.froth.zone",
  679. "https://insta.tromdienste.de"
  680. ],
  681. "i2p": [],
  682. "loki": [],
  683. "tor": [
  684. "http://qsuiaf4jio2yaxdbj6ljte3jmr6m7g333rujoilbtipjeawnou26frad.onion",
  685. "http://rlp5gt4d7dtkok3yaogocbcvrs2tdligjrxipsamztjq4wwpxzjeuxqd.onion"
  686. ],
  687. "yggdrasil": []
  688. },
  689. "biblioreads": {
  690. "clearnet": [
  691. "https://biblioreads.eu.org",
  692. "https://biblioreads.esmailelbob.xyz",
  693. "https://biblioreads.lunar.icu",
  694. "https://biblioreads.ga",
  695. "https://biblioreads.ml",
  696. "https://biblioreads.netlify.app",
  697. "https://bl.vern.cc",
  698. "https://biblioreads.privacyredirect.com"
  699. ],
  700. "i2p": [
  701. "http://vernapl3lpo3huqdx3pjzxqgdgavxjlmdskbvejh2gfqgmjuyvxq.b32.i2p"
  702. ],
  703. "loki": [],
  704. "tor": [
  705. "http://biblioreads.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion",
  706. "http://bl.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"
  707. ],
  708. "yggdrasil": []
  709. },
  710. "binternet": {
  711. "clearnet": [
  712. "https://binternet.ducks.party",
  713. "https://binternet.ahwx.org",
  714. "https://bn.bloat.cat",
  715. "https://binternet.revvy.de",
  716. "https://bn.opnxng.com",
  717. "https://binternet.privacyfucking.rocks"
  718. ],
  719. "i2p": [
  720. "http://revznkqdwy7nmlzql66x226g3qnapiooss3rg2uajbj4rypxjnba.b32.i2p",
  721. "http://5cv2aw6jhe6la444vpn3jvo46442ls3ccgp3difx5ddlv5yf4hlq.b32.i2p"
  722. ],
  723. "loki": [],
  724. "tor": [
  725. "http://binternet.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion",
  726. "http://binternet.skunky7dhv7nohsoalpwe3sxfz3fbkad7r3wk632riye25vqm3meqead.onion"
  727. ],
  728. "yggdrasil": []
  729. },
  730. "breezewiki": {
  731. "clearnet": [
  732. "https://antifandom.com",
  733. "https://bw.artemislena.eu",
  734. "https://breezewiki.pussthecat.org",
  735. "https://bw.projectsegfau.lt",
  736. "https://breeze.hostux.net",
  737. "https://breeze.nohost.network",
  738. "https://breezewiki.hyperreal.coffee",
  739. "https://breezewiki.nadeko.net",
  740. "https://bw.hamstro.dev",
  741. "https://fandom.reallyaweso.me",
  742. "https://breezewiki.frontendfriendly.xyz",
  743. "https://breezewiki.catsarch.com",
  744. "https://breeze.mint.lgbt",
  745. "https://breezewiki.woodland.cafe",
  746. "https://z.opnxng.com"
  747. ],
  748. "i2p": [
  749. "http://bw.vern.i2p"
  750. ],
  751. "loki": [],
  752. "tor": [],
  753. "yggdrasil": []
  754. },
  755. "btdigg": {
  756. "clearnet": [
  757. "https://btdig.com"
  758. ],
  759. "i2p": [
  760. "http://btdig.i2p"
  761. ],
  762. "loki": [],
  763. "tor": [
  764. "http://btdigggink2pdqzqrik3blmqemsbntpzwxottujilcdjfz56jumzfsyd.onion"
  765. ],
  766. "yggdrasil": []
  767. },
  768. "cloudtube": {
  769. "clearnet": [
  770. "https://tube.cadence.moe"
  771. ],
  772. "i2p": [],
  773. "loki": [],
  774. "tor": [],
  775. "yggdrasil": []
  776. },
  777. "destructables": {
  778. "clearnet": [
  779. "https://ds.vern.cc"
  780. ],
  781. "i2p": [],
  782. "loki": [],
  783. "tor": [],
  784. "yggdrasil": []
  785. },
  786. "dumb": {
  787. "clearnet": [
  788. "https://dumb.privacydev.net",
  789. "https://dumb.ducks.party",
  790. "https://dm.vern.cc",
  791. "https://dumb.reallyaweso.me",
  792. "https://dumb.lunar.icu",
  793. "https://dumb.esmailelbob.xyz",
  794. "https://sing.whatever.social"
  795. ],
  796. "i2p": [
  797. "http://vernxpcpqi2y4uhu7to4rnjmyjjgzh3x3qxyzpmkhykefchkmleq.b32.i2p"
  798. ],
  799. "loki": [],
  800. "tor": [
  801. "http://dumb.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion",
  802. "http://dm.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
  803. "http://dm.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"
  804. ],
  805. "yggdrasil": []
  806. },
  807. "facilmap": {
  808. "clearnet": [
  809. "https://facilmap.org"
  810. ],
  811. "i2p": [],
  812. "loki": [],
  813. "tor": [],
  814. "yggdrasil": []
  815. },
  816. "gothub": {
  817. "clearnet": [
  818. "https://gothub.lunar.icu",
  819. // "https://gh.riverside.rocks",
  820. // "https://dev.gh.akisblack.dev",
  821. "https://gothub.esmailelbob.xyz",
  822. "https://gothub.dev.projectsegfau.lt",
  823. // "https://gh.fascinated.cc",
  824. // "https://gh.whateveritworks.org",
  825. // "https://gothub.xbdm.fun",
  826. // "https://gothub.no-logs.com",
  827. "https://gothub.ducks.party",
  828. // "https://gh.creller.net",
  829. // "https://gh.akisblack.dev",
  830. // "https://gh.odyssey346.dev",
  831. "https://gh.phreedom.club",
  832. // "https://gh.vern.cc",
  833. "https://gothub.projectsegfau.lt",
  834. "https://gh.owo.si",
  835. "https://gothub.r4fo.com",
  836. "https://g.opnxng.com",
  837. "https://gothub.frontendfriendly.xyz",
  838. "https://gothub.private.coffee"
  839. ],
  840. "i2p": [],
  841. "loki": [],
  842. "tor": [],
  843. "yggdrasil": []
  844. },
  845. //"imgin": {
  846. // "clearnet": [],
  847. // "i2p": [],
  848. // "loki": [],
  849. // "tor": [],
  850. // "yggdrasil": []
  851. //},
  852. "indestructables": {
  853. "clearnet": [
  854. "https://indestructables.private.coffee"
  855. ],
  856. "i2p": [],
  857. "loki": [],
  858. "tor": [],
  859. "yggdrasil": []
  860. },
  861. "alltube": {
  862. "clearnet": [
  863. "https://alltube.private.coffee"
  864. ],
  865. "i2p": [],
  866. "loki": [],
  867. "tor": [],
  868. "yggdrasil": []
  869. },
  870. "invidious": {
  871. "clearnet": [
  872. "https://incogtube.com",
  873. "https://vid.puffyan.us",
  874. "https://yt.artemislena.eu",
  875. "https://iteroni.com",
  876. // "https://inv.oikei.net",
  877. "https://invidious.snopyta.org",
  878. "https://invidious.jing.rocks",
  879. "https://youtube.076.ne.jp",
  880. "https://invidious.osi.kr",
  881. // "https://invidious-us.kavin.rocks",
  882. // "https://inv.cthd.icu",
  883. // "https://invidious.namazso.eu",
  884. "https://yewtu.be",
  885. "https://invidio.xamh.de",
  886. // "https://invidious.kavin.rocks",
  887. "https://invidious.reallyaweso.me",
  888. "https://monocles.live",
  889. "https://inv.riverside.rocks",
  890. "https://invidious.lunar.icu",
  891. "https://y.com.sb",
  892. "https://inv.bp.projectsegfau.lt",
  893. "https://invidious.privacyredirect.com",
  894. "https://invidious.flokinet.to",
  895. "https://invidious.sethforprivacy.com",
  896. "https://invidious.esmailelbob.xyz",
  897. "https://ytb.trom.tf",
  898. "https://invidious.domain.glass",
  899. // "https://tube.cthd.icu",
  900. "https://inv.vern.cc",
  901. "https://invidious.garudalinux.org",
  902. "https://youtube.owacon.moe",
  903. "https://invidious.tinfoil-hat.net",
  904. "https://iv.melmac.space",
  905. "https://invidious.tiekoetter.com",
  906. "https://invidious.baczek.me",
  907. "https://invidious.no-logs.com",
  908. "https://invidious.incogniweb.net",
  909. "https://invidious.0011.lt",
  910. "https://yt.funami.tech",
  911. "https://inv.tux.pizza",
  912. "https://vid.priv.au",
  913. "https://not-ytb.blocus.ch",
  914. "https://inv.creller.net",
  915. "https://inv.zzls.xyz",
  916. "https://yt.floss.media",
  917. // "https://invidious.slipfox.xyz",
  918. "https://par1.iv.ggtyler.dev",
  919. "https://inv.citw.lgbt",
  920. "https://invidious.io.lol",
  921. "https://yt.oelrichsgarcia.de",
  922. "https://iv.nboeck.de",
  923. "https://invidious.protokolla.fi",
  924. "https://invidious.fi",
  925. "https://onion.tube",
  926. "https://inv.in.projectsegfau.lt",
  927. "https://invidious.privacydev.net",
  928. "https://invidious.takebackourtech.org",
  929. "https://qc1.iv.ggtyler.dev",
  930. "https://anontube.lvkaszus.pl",
  931. "https://invidious.asir.dev",
  932. "https://invidious.fdn.fr",
  933. "https://iv.datura.network",
  934. "https://invidious.private.coffee",
  935. "https://inv.pistasjis.net",
  936. "https://invidious.pavot.ca",
  937. "https://yt.cdaut.de",
  938. "https://yt.drgnz.club",
  939. "https://invidious.perennialte.ch",
  940. "https://yt.chaotic.ninja",
  941. "https://yt.omada.cafe",
  942. "https://super8.absturztau.be",
  943. "https://i.redsnake.io",
  944. "https://watch.supernets.org",
  945. "https://invidious.qwik.space",
  946. // "https://inv.odyssey346.dev",
  947. "https://invidious.mutahar.rocks",
  948. "https://invidious.nerdvpn.de",
  949. "https://invidious.projectsegfau.lt",
  950. "https://invidious.weblibre.org",
  951. "https://iv.ggtyler.dev",
  952. // "https://watch.thekitty.zone",
  953. "https://inv.us.projectsegfau.lt",
  954. "https://invidious.drgns.space",
  955. "https://invidious.kalli.st"
  956. ],
  957. "i2p": [
  958. "http://tube.i2p",
  959. "http://inv.cn.i2p",
  960. "http://jewtube.i2p",
  961. "http://ytmous.i2p",
  962. "http://pa7eextqat4wg35onzs4cnlhqa3gvzen243bcbrng67zyla4fqya.b32.i2p",
  963. "http://inv.vern.i2p",
  964. "http://inv.zzls.i2p",
  965. "http://invidious.qwik.i2p",
  966. "http://verni6dr4qxjgjumnvesxerh5rvhv6oy5ddeibaqy5d7tgbiiyfa.b32.i2p"
  967. ],
  968. "loki": [],
  969. "tor": [
  970. "http://tuberyps2pn6dor6h47brof3w2asmauahhk4ei42krugybzzzo55klad.onion",
  971. "http://qwikxxeiw4kgmml6vjw2bsxtviuwjce735dunai2djhu6q7qbacq73id.onion",
  972. "http://qwikxxt6jvggxzxe2v2fuzro5j7ibgphxmblmri6wkj5vpicdbo2kwad.onion",
  973. "http://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion",
  974. "http://grwp24hodrefzvjjuccrkw3mjq4tzhaaq32amf33dzpmuxe7ilepcmad.onion",
  975. "http://invidious.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion",
  976. "http://euxxcnhsynwmfidvhjf6uzptsmh4dipkmgdmcmxxuo7tunp3ad2jrwyd.onion",
  977. "http://invidious.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion",
  978. "http://iv.odysfvr23q5wgt7i456o5t3trw2cw5dgn56vbjfbq2m7xsc5vqbqpcyd.onion",
  979. "http://kbjggqkzv65ivcqj6bumvp337z6264huv5kpkwuv6gu5yjiskvan7fad.onion",
  980. "http://ng27owmagn5amdm7l5s3rsqxwscl5ynppnis5dqcasogkyxcfqn7psid.onion",
  981. "http://osbivz6guyeahrwp2lnwyjk2xos342h4ocsxyqrlaopqjuhwn2djiiyd.onion",
  982. "http://u2cvlit75owumwpy4dj2hsmvkq7nvrclkpht7xgyye2pyoxhpmclkrad.onion",
  983. "http://w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion"
  984. ],
  985. "yggdrasil": [
  986. "http://[200:168a:c80a:b258:1dfe:f920:4414:6897]"
  987. ]
  988. },
  989. "kddit": {
  990. "clearnet": [
  991. "https://kddit.kalli.st"
  992. ],
  993. "i2p": [],
  994. "loki": [],
  995. "tor": [],
  996. "yggdrasil": []
  997. },
  998. "minisearch": {
  999. "clearnet": [
  1000. "https://minisearch.r4fo.com"
  1001. ],
  1002. "i2p": [],
  1003. "loki": [],
  1004. "tor": [],
  1005. "yggdrasil": []
  1006. },
  1007. "laboratory": {
  1008. "clearnet": [
  1009. //"https://lab.bloatcat.tk",
  1010. "https://lab.vern.cc",
  1011. // "https://laboratory.vitali64.duckdns.org"
  1012. ],
  1013. "i2p": [],
  1014. "loki": [],
  1015. "tor": [],
  1016. "yggdrasil": []
  1017. },
  1018. "libmedium": {
  1019. "clearnet": [
  1020. "https://medium.hostux.net",
  1021. "https://libmedium.batsense.net",
  1022. "https://med.ngn.tf",
  1023. "https://md.vern.cc"
  1024. ],
  1025. "i2p": [
  1026. "http://vernaqj2qr2pijpgvf3od6ssc3ulz3nv52gwr3hba5l6humuzmgq.b32.i2p"
  1027. ],
  1028. "loki": [],
  1029. "tor": [
  1030. "http://md.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"
  1031. ],
  1032. "yggdrasil": []
  1033. },
  1034. "librarian": {
  1035. "clearnet": [
  1036. "https://librarian.pussthecat.org",
  1037. "https://odysee.076.ne.jp",
  1038. "https://lbry.projectsegfau.lt",
  1039. "https://librarian.esmailelbob.xyz",
  1040. "https://lbry.mywire.org",
  1041. // "https://lbry.slipfox.xyz",
  1042. "https://lbry.vern.cc",
  1043. "https://lbry.ooguy.com",
  1044. "https://lbn.frail.duckdns.org",
  1045. "https://odysee.owacon.moe",
  1046. "https://lbry.bcow.xyz"
  1047. ],
  1048. "i2p": [],
  1049. "loki": [],
  1050. "tor": [
  1051. "http://librarian.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion",
  1052. "http://lbry.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
  1053. "http://5znbzx2xcymhddzekfjib3isgqq4ilcyxa2bsq6vqmnvbtgu4f776lqd.onion",
  1054. "http://bxewpsswttslepw27w2hhxhlizwm7l7y54x3jw5cfrb64hb6lgc557ad.onion"
  1055. ],
  1056. "yggdrasil": []
  1057. },
  1058. "libreddit": {
  1059. "clearnet": [
  1060. "https://libreddit.spike.codes",
  1061. "https://libreddit.nl",
  1062. "https://libreddit.strongthany.cc",
  1063. "https://libreddit.40two.app",
  1064. "https://libreddit.albony.xyz",
  1065. "https://libreddit.privacydev.net",
  1066. "https://libreddit.kavin.rocks",
  1067. "https://libreddit.privacy.com.de",
  1068. // "https://libreddit.bloatcat.tk",
  1069. // "https://libreddit.no-logs.com",
  1070. // "https://lr.slipfox.xyz",
  1071. "https://lr.creller.net",
  1072. "https://libreddit.dcs0.hu",
  1073. "https://libreddit.tux.pizza",
  1074. "https://snoo.habedieeh.re",
  1075. "https://lr.4201337.xyz",
  1076. "https://lr.artemislena.eu",
  1077. "https://libreddit.privacyfucking.rocks",
  1078. "https://libreddit.qwik.space",
  1079. "https://de.leddit.xyz",
  1080. "https://leddit.xyz",
  1081. "https://libreddit.autarkic.org",
  1082. "https://libreddit.crewz.me",
  1083. "https://libreddit.de",
  1084. "https://libreddit.dothq.co",
  1085. "https://libreddit.drivet.xyz",
  1086. "https://libreddit.igna.rocks",
  1087. "https://libredd.it",
  1088. "https://libreddit.jamiethalacker.dev",
  1089. "https://libreddit.kylrth.com",
  1090. "https://libreddit.lunar.icu",
  1091. // "https://libreddit.northboot.xyz",
  1092. "https://libreddit.pussthecat.org",
  1093. "https://libreddit.silkky.cloud",
  1094. "https://libreddit.sugoma.tk",
  1095. "https://libreddit.tiekoetter.com",
  1096. "https://libreddit.winscloud.net",
  1097. "https://libreddit.yonalee.eu",
  1098. "https://lr.cowfee.moe",
  1099. "https://lr.mint.lgbt",
  1100. "https://lr.oversold.host",
  1101. "https://lr.stilic.ml",
  1102. "https://r.nf",
  1103. "https://r.walkx.org",
  1104. "https://reddit.artemislena.eu",
  1105. "https://reddit.phii.me",
  1106. "https://reddit.rtrace.io",
  1107. "https://reddit.stuehieyr.com",
  1108. "https://libreddit.nohost.network",
  1109. "https://reddit.simo.sh"
  1110. ],
  1111. "i2p": [
  1112. "http://woo5ugmoomzbtaq6z46q4wgei5mqmc6jkafqfi5c37zni7xc4ymq.b32.i2p"
  1113. ],
  1114. "loki": [],
  1115. "tor": [
  1116. "http://spjmllawtheisznfs7uryhxumin26ssv2draj7oope3ok3wuhy43eoyd.onion",
  1117. "http://qwikxxeiw4kgmml6vjw2bsxtviuwjce735dunai2djhu6q7qbacq73id.onion",
  1118. "http://qwikxx4xqvhdyyazkrw7pwdpdppfnmn7j2n6cvq5zecm4atbppaslzad.onion",
  1119. "http://ecue64ybzvn6vjzl37kcsnwt4ycmbsyf74nbttyg7rkc3t3qwnj7mcyd.onion",
  1120. "http://fwhhsbrbltmrct5hshrnqlqygqvcgmnek3cnka55zj4y7nuus5muwyyd.onion",
  1121. "http://inytumdgnri7xsqtvpntjevaelxtgbjqkuqhtf6txxhwbll2fwqtakqd.onion",
  1122. "http://kphht2jcflojtqte4b4kyx7p2ahagv4debjj32nre67dxz7y57seqwyd.onion",
  1123. "http://kzhfp3nvb4qp575vy23ccbrgfocezjtl5dx66uthgrhu7nscu6rcwjyd.onion",
  1124. "http://lbrdtjaj7567ptdd4rv74lv27qhxfkraabnyphgcvptl64ijx2tijwid.onion",
  1125. "http://libreddit.2syis2nnyytz6jnusnjurva4swlaizlnleiks5mjp46phuwjbdjqwgqd.onion",
  1126. "http://ledditqo2mxfvlgobxnlhrkq4dh34jss6evfkdkb2thlvy6dn4f4gpyd.onion",
  1127. "http://libreddit.lqs5fjmajyp7rvp4qvyubwofzi6d4imua7vs237rkc4m5qogitqwrgyd.onion",
  1128. "http://libredoxhxwnmsb6dvzzd35hmgzmawsq5i764es7witwhddvpc2razid.onion",
  1129. "http://ol5begilptoou34emq2sshf3may3hlblvipdjtybbovpb7c7zodxmtqd.onion",
  1130. "http://liredejj74h5xjqr2dylnl5howb2bpikfowqoveub55ru27x43357iid.onion"
  1131. ],
  1132. "yggdrasil": []
  1133. },
  1134. "libremdb": {
  1135. "clearnet": [
  1136. "https://libremdb.iket.me",
  1137. "https://lmdb.ngn.tf",
  1138. "https://ld.vern.cc",
  1139. "https://libremdb.esmailelbob.xyz",
  1140. "https://binge.whatever.social",
  1141. "https://lmdb.tokhmi.xyz",
  1142. "https://libremdb.ducks.party",
  1143. "https://libremdb.lunar.icu",
  1144. "https://libremdbeu.herokuapp.com",
  1145. "https://libremdb.pussthecat.org",
  1146. "https://libremdb.jeikobu.net",
  1147. "https://lmdb.hostux.net",
  1148. "https://libremdb.catsarch.com",
  1149. "https://libremdb.frontendfriendly.xyz",
  1150. // "https://libremdb.fascinated.cc"
  1151. ],
  1152. "i2p": [
  1153. "http://vernz3ubrntql4wrgyrssd6u3qzi36zrhz2agbo6vibzbs5olk2q.b32.i2p"
  1154. ],
  1155. "loki": [],
  1156. "tor": [
  1157. "http://ld.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
  1158. "http://libremdb.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion"
  1159. ],
  1160. "yggdrasil": []
  1161. },
  1162. "librex": {
  1163. "clearnet": [
  1164. // "https://librex.bloatcat.tk",
  1165. "https://search.pabloferreiro.es",
  1166. "https://search.funami.tech",
  1167. "https://librex.retro-hax.net",
  1168. "https://librex.zzls.xyz",
  1169. "https://librex.nohost.network",
  1170. "https://librex.baczek.me",
  1171. "https://buscar.weblibre.org",
  1172. "https://librex.mikata.ru",
  1173. "https://librex.myroware.eu",
  1174. "https://librex.pufe.org",
  1175. "https://librex.revvy.de",
  1176. "https://lx.vern.cc",
  1177. "https://search.femboy.hu",
  1178. "https://search.madreyk.xyz",
  1179. "https://search.milivojevic.in.rs",
  1180. "https://search.sesu.cc",
  1181. "https://search.tildevarsh.in",
  1182. "https://librex.ratakor.com",
  1183. "https://lx.drain.win"
  1184. ],
  1185. "i2p": [
  1186. "http://7huurwog32tny663wkglrhozfoyqyqmsuxjbd7dtudccx44awjda.b32.i2p",
  1187. "http://lqbchqljxiwl3bbjt4vqe76luovk5ly6khqhg7mt5qcqfn6e4sbq.b32.i2p",
  1188. "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p",
  1189. "http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p"
  1190. ],
  1191. "loki": [],
  1192. "tor": [
  1193. "http://fcnfg6avz45hqzwbneekq57u2mqbnwa7veyvjcc4dndqbatvkjlaj7yd.onion",
  1194. "http://f7ssz7l3biu4fugwctfpcx4txg5yq4gqhrt473ledsuc3ivtd3omniid.onion",
  1195. "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion",
  1196. "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion",
  1197. "http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
  1198. "http://search.cepyxplublbyw2f4axy4pyztfbxmf63lrt2c7uwv6wl4iixz53czload.onion",
  1199. "http://search.swxoebbpeqiiixyhbuh3vbw53pdrmtbiaj2sqveol6kkn5rpapfi4aad.onion"
  1200. ],
  1201. "yggdrasil": []
  1202. },
  1203. "librey": {
  1204. "clearnet": [
  1205. "https://search.pabloferreiro.es",
  1206. "https://search.funami.tech",
  1207. "https://librex.retro-hax.net",
  1208. "https://search.davidovski.xyz",
  1209. "https://search.zeroish.xyz",
  1210. "https://search.seitan-ayoub.lol",
  1211. "https://lx.benike.me",
  1212. "https://librey.baczek.me",
  1213. "https://librex.yogeshlamichhane.com.np",
  1214. "https://librex.nohost.network",
  1215. "https://librex.ix.tc",
  1216. "https://librex.uk.to",
  1217. "https://librex.supernets.org",
  1218. "https://librey.org",
  1219. "https://librey.danyaal.xyz",
  1220. "https://ly.owo.si",
  1221. "https://search2.ahwx.org",
  1222. "https://search.ratakor.com",
  1223. "https://search.ahwx.org",
  1224. "https://search3.ahwx.org"
  1225. ],
  1226. "i2p": [
  1227. "http://d4vi3tvfui2rfzsxr33tin4a6542heulf4mhkokdpbhbcejlg3la.b32.i2p",
  1228. "http://libreyqmoa2iuihoyyscolhaymrxxgdrmkgmiufnyaukwub2c7ya.b32.i2p"
  1229. ],
  1230. "loki": [],
  1231. "tor": [
  1232. "http://ly.pk47sgwhncn5cgidm7bofngmh7lc7ukjdpk5bjwfemmyp27ovl25ikyd.onion",
  1233. "http://libreytvcxak42f3p7nxh3filsp2pjqesjii5f5e4eivs2gpcn77tdid.onion",
  1234. "http://hyy7rcvknwb22v4nnoar635wntiwr4uwzhiuyimemyl4fz6k7tahj5id.onion",
  1235. "http://wn5jl6fxlzzfenlyu3lc4q7jpw2saplrywxvxtvqbguotwd4y5cjeuqd.onion",
  1236. "http://jxhkfulu6wpdl4apuy4dyivuowmpprvsd7e3el2z73crq7fmyv7rjkyd.onion",
  1237. "http://ouosr2fq3lktngcvbz4r4op2lab5hbiz5y6g6toorsgieb7elet76jad.onion"
  1238. ],
  1239. "yggdrasil": []
  1240. },
  1241. "lieu": {
  1242. "clearnet": [
  1243. "https://lieu.cblgh.org"
  1244. ],
  1245. "i2p": [],
  1246. "loki": [],
  1247. "tor": [],
  1248. "yggdrasil": []
  1249. },
  1250. "lingva": {
  1251. "clearnet": [
  1252. "https://lingva.reallyaweso.me",
  1253. "https://translate.libtar.de",
  1254. "https://lingva.frontendfriendly.xyz",
  1255. "https://lingva.retiolus.net",
  1256. "https://translate.plausibility.cloud",
  1257. "https://lingva.lunar.icu",
  1258. "https://lingva.dialectapp.org"
  1259. ],
  1260. "i2p": [],
  1261. "loki": [],
  1262. "tor": [],
  1263. "yggdrasil": []
  1264. },
  1265. "metastem": {
  1266. "clearnet": [
  1267. "https://go.metastem.su"
  1268. ],
  1269. "i2p": [],
  1270. "loki": [],
  1271. "tor": [],
  1272. "yggdrasil": []
  1273. },
  1274. "metastemwiki": {
  1275. "clearnet": [
  1276. "https://wiki.metastem.su"
  1277. ],
  1278. "i2p": [],
  1279. "loki": [],
  1280. "tor": [],
  1281. "yggdrasil": []
  1282. },
  1283. "mikuinvidious": {
  1284. "clearnet": [
  1285. "https://mi.resrv.org",
  1286. "https://mikuinv-gs.vern.cc",
  1287. "https://mikuinv.resrv.org",
  1288. "https://moeyy.cn/mikuinvidious"
  1289. ],
  1290. "i2p": [],
  1291. "loki": [],
  1292. "tor": [],
  1293. "yggdrasil": []
  1294. },
  1295. "mozhi": {
  1296. "clearnet": [
  1297. "https://mozhi.pussthecat.org",
  1298. "https://translate.bus-hit.me",
  1299. "https://translate.perennialte.ch"
  1300. ],
  1301. "i2p": [],
  1302. "loki": [],
  1303. "tor": [],
  1304. "yggdrasil": []
  1305. },
  1306. "neuters": {
  1307. "clearnet": [
  1308. "https://neuters.de",
  1309. "https://neuters.privacyfucking.rocks",
  1310. "https://nu.vern.cc",
  1311. "https://neuters.vern.cc",
  1312. "https://reuters.vern.cc"
  1313. ],
  1314. "i2p": [],
  1315. "loki": [],
  1316. "tor": [],
  1317. "yggdrasil": []
  1318. },
  1319. "nitter": {
  1320. "clearnet": [
  1321. "https://nitter.hu",
  1322. "https://nitter.actionsack.com",
  1323. "https://nitter.net",
  1324. "https://nitter.1d4.us",
  1325. "https://nitter.nixnet.services",
  1326. "https://nitter.unixfox.eu",
  1327. "https://nitter.sethforprivacy.com",
  1328. "https://nitter.pussthecat.org",
  1329. "https://nitter.it",
  1330. "https://nitter.moomoo.me",
  1331. "https://tw.artemislena.eu",
  1332. "https://nitter.snopyta.org",
  1333. "https://birdsite.xanny.family",
  1334. "https://nitter.domain.glass",
  1335. // "https://read.whatever.social",
  1336. // "https://nitter.lacontrevoie.fr",
  1337. "https://bird.trom.tf",
  1338. "https://nitter.hostux.net",
  1339. "https://nitter.sneed.network",
  1340. "https://twitter.owacon.moe",
  1341. "https://nitter.ggc-project.de",
  1342. "https://unofficialbird.com",
  1343. "https://nitter.fdn.fr",
  1344. "https://nitter.no-logs.com",
  1345. // "https://nitter.slipfox.xyz",
  1346. "https://nitter.one",
  1347. "https://nitter.ungovernable.men",
  1348. "https://nitter.private.coffee",
  1349. // "https://nitter.soopy.moe",
  1350. "https://nitter.oksocial.net",
  1351. "https://n.sneed.network",
  1352. "https://nitter.qwik.space",
  1353. "https://nitter.nohost.network",
  1354. "https://de.nttr.stream",
  1355. "https://nitter.42l.fr",
  1356. "https://nitter.bus-hit.me",
  1357. // "https://nitter.ca",
  1358. // "https://nitter.eu",
  1359. "https://nitter.grimneko.de",
  1360. "https://nitter.kavin.rocks",
  1361. "https://nitter.koyu.space",
  1362. // "https://nitter.namazso.eu",
  1363. "https://nttr.stream",
  1364. "https://twitter.076.ne.jp",
  1365. "https://twitter.censors.us",
  1366. "https://n.hyperborea.cloud",
  1367. "https://n.biendeo.com",
  1368. // "https://n.opnxng.com",
  1369. "https://nitter.adminforge.de",
  1370. "https://nitter.catsarch.com",
  1371. "https://nitter.cz",
  1372. "https://nitter.esmailelbob.xyz",
  1373. "https://nitter.in.projectsegfau.lt",
  1374. "https://nitter.io.lol",
  1375. "https://nitter.ktachibana.party",
  1376. "https://nitter.kylrth.com",
  1377. "https://nitter.poast.org",
  1378. "https://nitter.privacydev.net",
  1379. "https://nitter.salastil.com",
  1380. "https://nitter.woodland.cafe",
  1381. "https://nitter.dcs0.hu"
  1382. ],
  1383. "i2p": [
  1384. "http://tm4rwkeysv3zz3q5yacyr4rlmca2c4etkdobfvuqzt6vsfsu4weq.b32.i2p"
  1385. ],
  1386. "loki": [],
  1387. "tor": [
  1388. "http://qwikxxeiw4kgmml6vjw2bsxtviuwjce735dunai2djhu6q7qbacq73id.onion",
  1389. "http://qwikxx2erhx6qrymued6ox2qkf2yeogjwypqvzoif4fqkljixasr6oid.onion",
  1390. "http://n.sneed4fmhevap3ci4xhf4wgkf72lwk275lcgomnfgwniwmqvaxyluuid.onion"
  1391. ],
  1392. "yggdrasil": []
  1393. },
  1394. "openstreetmap": {
  1395. "clearnet": [
  1396. "https://www.openstreetmap.org"
  1397. ],
  1398. "i2p": [],
  1399. "loki": [],
  1400. "tor": [],
  1401. "yggdrasil": []
  1402. },
  1403. "tubo": {
  1404. "clearnet": [
  1405. "https://tubo.media",
  1406. "https://tubo.reallyaweso.me"
  1407. ],
  1408. "i2p": [],
  1409. "loki": [],
  1410. "tor": [],
  1411. "yggdrasil": []
  1412. },
  1413. "twineo": {
  1414. "clearnet": [
  1415. "https://twineo.reallyaweso.me"
  1416. ],
  1417. "i2p": [],
  1418. "loki": [],
  1419. "tor": [],
  1420. "yggdrasil": []
  1421. },
  1422. "pipedmaterial": {
  1423. "clearnet": [
  1424. //"https://ngp.piped.xn--17b.net",
  1425. // "https://piped-material.xn--17b.net"
  1426. ],
  1427. "i2p": [],
  1428. "loki": [],
  1429. "tor": [],
  1430. "yggdrasil": []
  1431. },
  1432. "piped": {
  1433. "clearnet": [
  1434. "https://piped.mint.lgbt",
  1435. "https://piped.video",
  1436. "https://watch.whatevertinfoil.de",
  1437. "https://piped.ducks.party",
  1438. "https://watch.whatever.social",
  1439. "https://piped.reallyaweso.me",
  1440. "https://piped.hostux.net",
  1441. "https://piped.no-logs.com",
  1442. "https://piped.qdi.fi",
  1443. "https://piped.ngn.tf",
  1444. "https://il.ax",
  1445. "https://piped.projectsegfau.lt",
  1446. "https://pd.vern.cc",
  1447. "https://piped.privacydev.net",
  1448. "https://piped.chauvet.pro",
  1449. "https://piped.smnz.de",
  1450. "https://piped.adminforge.de",
  1451. "https://srv.piped.video",
  1452. "https://piped.lunar.icu",
  1453. "https://piped.esmailelbob.xyz",
  1454. "https://piped.garudalinux.org",
  1455. "https://piped.in.projectsegfau.lt",
  1456. "https://piped.mha.fi",
  1457. "https://piped.privacy.com.de",
  1458. "https://piped.tokhmi.xyz",
  1459. "https://piped.us.projectsegfau.lt",
  1460. "https://watch.leptons.xyz",
  1461. "https://piped.palveluntarjoaja.eu"
  1462. ],
  1463. "i2p": [],
  1464. "loki": [],
  1465. "tor": [],
  1466. "yggdrasil": []
  1467. },
  1468. "priviblur": {
  1469. "clearnet": [
  1470. "https://tb.opnxng.com",
  1471. // "https://pb.bloat.cat"
  1472. ],
  1473. "i2p": [],
  1474. "loki": [],
  1475. "tor": [],
  1476. "yggdrasil": []
  1477. },
  1478. "pixivfe": {
  1479. "clearnet": [
  1480. "https://pixiv.ducks.party",
  1481. "https://pixiv.perennialte.ch",
  1482. "https://pixivfe.ducks.party",
  1483. "https://pixivfe.exozy.me"
  1484. ],
  1485. "i2p": [],
  1486. "loki": [],
  1487. "tor": [],
  1488. "yggdrasil": []
  1489. },
  1490. "poketube": {
  1491. "clearnet": [
  1492. "https://poketube.fun",
  1493. // "https://pt.zzls.xyz"
  1494. ],
  1495. "i2p": [],
  1496. "loki": [],
  1497. "tor": [],
  1498. "yggdrasil": []
  1499. },
  1500. "proxigram": {
  1501. "clearnet": [
  1502. "https://ig.opnxng.com",
  1503. "https://proxigram.lunar.icu",
  1504. "https://proxigram.ducks.party",
  1505. // "https://ig.vern.cc/",
  1506. // "https://proxigram.vern.cc",
  1507. // "https://instagram.vern.cc",
  1508. // "https://proxigram.privacyredirect.com",
  1509. // "https://proxigram.kyun.li"
  1510. ],
  1511. "i2p": [],
  1512. "loki": [],
  1513. "tor": [],
  1514. "yggdrasil": []
  1515. },
  1516. "proxitok": {
  1517. "clearnet": [
  1518. "https://proxitok.lunar.icu",
  1519. "https://tik.hostux.net",
  1520. "https://proxitok.pabloferreiro.es",
  1521. "https://proxitok.privacy.com.de",
  1522. "https://tok.adminforge.de",
  1523. "https://tok.habedieeh.re",
  1524. "https://proxitok.pussthecat.org",
  1525. "https://proxitok.privacyfucking.rocks",
  1526. "https://cringe.whatever.social",
  1527. "https://proxitok.esmailelbob.xyz",
  1528. "https://proxitok.privacydev.net",
  1529. "https://proxitok.pufe.org",
  1530. "https://cringe.datura.network",
  1531. "https://tok.artemislena.eu",
  1532. // "https://tok.thekitty.zone",
  1533. "https://proxitok.privacyredirect.com",
  1534. "https://tiktok.chauvet.pro",
  1535. "https://proxitok.r4fo.com",
  1536. "https://tt.vern.cc",
  1537. "https://tiktok.vern.cc",
  1538. "https://proxitok.vern.cc"
  1539. ],
  1540. "i2p": [
  1541. "http://qr.vern.i2p"
  1542. ],
  1543. "loki": [],
  1544. "tor": [],
  1545. "yggdrasil": []
  1546. },
  1547. "quetre": {
  1548. "clearnet": [
  1549. "https://quetre.privacydev.net",
  1550. "https://quetre.pufe.org",
  1551. "https://que.wilbvr.me",
  1552. "https://quetre.iket.me",
  1553. "https://quetre.pussthecat.org",
  1554. "https://quetre.ducks.party",
  1555. "https://quetre.perennialte.ch",
  1556. "https://quetre.tokhmi.xyz",
  1557. "https://quetre.projectsegfau.lt",
  1558. "https://quetre.esmailelbob.xyz",
  1559. // "https://quetre.odyssey346.dev",
  1560. "https://quetre.marcopisco.com",
  1561. "https://quetre.blackdrgn.nl",
  1562. "https://quetre.lunar.icu",
  1563. "https://quora.femboy.hu",
  1564. "https://quora.vern.cc",
  1565. // "https://quetre.fascinated.cc",
  1566. "https://quetre.rootdo.com"
  1567. ],
  1568. "i2p": [],
  1569. "loki": [],
  1570. "tor": [
  1571. "http://ask.habeehrhadazsw3izbrbilqajalfyqqln54mrja3iwpqxgcuxnus7eid.onion",
  1572. "http://qr.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion",
  1573. "http://quetre.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion",
  1574. "http://quetre.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion",
  1575. "http://quora.cepyxplublbyw2f4axy4pyztfbxmf63lrt2c7uwv6wl4iixz53czload.onion"
  1576. ],
  1577. "yggdrasil": []
  1578. },
  1579. "redlib": {
  1580. "clearnet": [
  1581. "https://redlib.incogniweb.net",
  1582. "https://discuss.whatever.social",
  1583. "https://libreddit.bus-hit.me",
  1584. "https://l.opnxng.com",
  1585. "https://red.ngn.tf",
  1586. "https://reddit.invak.id",
  1587. "https://r.darrennathanael.com",
  1588. "https://red.artemislena.eu",
  1589. "https://reddit.owo.si",
  1590. "https://safereddit.com",
  1591. "https://lr.n8pjl.ca",
  1592. "https://libreddit.projectsegfau.lt",
  1593. "https://redlib.kittywi.re",
  1594. "https://redlib.privacyredirect.com",
  1595. "https://redlib.vimmer.dev",
  1596. "https://redlib.catsarch.com",
  1597. "https://redlib.matthew.science",
  1598. "https://redlib.pussthecat.org/",
  1599. "https://redlib.tux.pizza",
  1600. "https://reddit.idevicehacked.com",
  1601. "https://redlib.private.coffee",
  1602. "https://redlib.ducks.party",
  1603. "https://redlib.reallyaweso.me",
  1604. "https://redlib.perennialte.ch",
  1605. "https://rl.bloat.cat"
  1606. ],
  1607. "i2p": [],
  1608. "loki": [],
  1609. "tor": [],
  1610. "yggdrasil": []
  1611. },
  1612. "rimgo": {
  1613. "clearnet": [
  1614. "https://rimgo.bus-hit.me",
  1615. "https://rimgo.pussthecat.org",
  1616. "https://rimgo.totaldarkness.net",
  1617. "https://rimgo.perennialte.ch",
  1618. "https://img.riverside.rocks",
  1619. "https://rimgo.reallyaweso.me",
  1620. "https://i.bcow.xyz",
  1621. "https://rimgo.hostux.net",
  1622. "https://rimgo.privacyredirect.com",
  1623. "https://ri.zzls.xyz",
  1624. "https://i.habedieeh.re",
  1625. "https://rimgo.ducks.party",
  1626. "https://rimgo.vern.cc",
  1627. "https://rimgo.nohost.network",
  1628. "https://imgur.artemislena.eu",
  1629. // "https://rim.odyssey346.dev",
  1630. "https://rimgo.lunar.icu",
  1631. "https://rimgo.kling.gg",
  1632. "https://rimgo.projectsegfau.lt",
  1633. "https://rimgo.catsarch.com",
  1634. // "https://rimgo.fascinated.cc"
  1635. ],
  1636. "i2p": [],
  1637. "loki": [],
  1638. "tor": [],
  1639. "yggdrasil": []
  1640. },
  1641. "ruraldictionary": {
  1642. "clearnet": [
  1643. "https://rd.vern.cc",
  1644. "https://isdoingyour.mom",
  1645. // "https://rd.bloatcat.tk",
  1646. "https://ruraldictionary.esmailelbob.xyz"
  1647. ],
  1648. "i2p": [
  1649. "http://vern5cxiaufqvhv4hu5ypkvw3tiwvuinae4evdbqzrioql6s2sha.b32.i2p"
  1650. ],
  1651. "loki": [],
  1652. "tor": [
  1653. "http://ruraldictionary.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion",
  1654. "http://rd.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"
  1655. ],
  1656. "yggdrasil": []
  1657. },
  1658. "safetwitch": {
  1659. "clearnet": [
  1660. "https://safetwitch.drgns.space",
  1661. "https://st.ngn.tf",
  1662. "https://safetwitch.ducks.party",
  1663. "https://safetwitch.privacyredirect.com/"
  1664. ],
  1665. "i2p": [],
  1666. "loki": [],
  1667. "tor": [],
  1668. "yggdrasil": []
  1669. },
  1670. "scribe": {
  1671. "clearnet": [
  1672. "https://scribe.nixnet.services",
  1673. "https://scribe.ducks.party",
  1674. "https://scribe.rip",
  1675. "https://scribe.citizen4.eu",
  1676. "https://scribe.reallyaweso.me",
  1677. "https://scribe.froth.zone",
  1678. "https://scribe.privacyredirect.com",
  1679. "https://scribe.bus-hit.me",
  1680. "https://scribe.perennialte.ch",
  1681. "https://sc.vern.cc",
  1682. "https://scribe.manasiwibi.com",
  1683. "https://m.opnxng.com"
  1684. ],
  1685. "i2p": [],
  1686. "loki": [],
  1687. "tor": [],
  1688. "yggdrasil": []
  1689. },
  1690. "searx": {
  1691. "clearnet": [
  1692. "https://search.reallyaweso.me",
  1693. "https://search.incogniweb.net",
  1694. "https://seeks.hsbp.org",
  1695. "https://putin.agency",
  1696. "http://search.homecomputing.fr",
  1697. "https://seeks.okhin.fr",
  1698. "https://s3arch.eu",
  1699. "https://quackquackgo.nl",
  1700. "https://baresearch.org",
  1701. "https://searx.coding4schoki.org",
  1702. "https://searx.netzspielplatz.de",
  1703. "https://searx.perennialte.ch",
  1704. "https://searx.laquadrature.net",
  1705. "https://sx.thatxtreme.dev",
  1706. "https://vibrisse.gatti.ninja",
  1707. "https://search.smnz.de",
  1708. "https://search.sapti.me",
  1709. "https://twinkpad.pl",
  1710. "https://search.demoniak.ch",
  1711. "https://search.rhscz.eu",
  1712. "https://search.nadeko.net",
  1713. "https://searx.oe5tpo.com",
  1714. "https://search.trashserver.net",
  1715. "https://searx.ee",
  1716. "https://vanderwilhelm.me",
  1717. "https://nogoo.me",
  1718. "https://xo.wtf",
  1719. "https://search.r4fo.com",
  1720. "https://searx.brihx.fr",
  1721. "https://search.kujiu.org",
  1722. "https://searx.new-admin.net",
  1723. "https://posativ.org/search",
  1724. "https://searx.crazypotato.tk",
  1725. "https://searx.32bitflo.at",
  1726. "https://el-hoyo.net/searx",
  1727. "https://www.privatesearch.io",
  1728. "https://search.jpope.org",
  1729. "https://search.casperlefantom.net",
  1730. "https://search.freezetux.net",
  1731. "https://framabee.org",
  1732. "https://searx.info",
  1733. "https://search.koehn.com",
  1734. "https://searx.fossencdi.org",
  1735. "https://search.jollausers.de",
  1736. "https://blackholeroutercondition.com",
  1737. "https://some.shady.website/search",
  1738. "https://matrix.ac/searx",
  1739. "https://searx.jeanphilippemorvan.info",
  1740. "https://searx.potato.hu",
  1741. "https://www.searx.de",
  1742. "https://searx.me",
  1743. "http://suche.linuxundich.de",
  1744. "https://search.blackit.de",
  1745. "https://suche.elaon.de",
  1746. "https://search.homecomputing.fr",
  1747. "https://trouvons.org",
  1748. "https://tontonroger.org",
  1749. "https://searx.volcanis.me",
  1750. "https://quackquackgo.nl/search",
  1751. "https://search.notoriousdev.com",
  1752. "https://www.ready.pm",
  1753. "https://searx.nulltime.net",
  1754. "https://searx.schrodinger.io",
  1755. "https://searx.drakonix.net",
  1756. "https://searx.aquilenet.fr",
  1757. "https://searx.4ray.co",
  1758. "https://search.azkware.net",
  1759. "https://schrodinger.io",
  1760. // "https://heraut.eu/search",
  1761. "https://searx.ch",
  1762. // "https://rathorian.fr",
  1763. "https://search.biboumail.fr",
  1764. "https://searx.xyz",
  1765. "https://searx.ru",
  1766. "https://searx.dk",
  1767. "https://suche.ftp.sh",
  1768. "https://searx.nogafa.org",
  1769. "https://www.gruble.de",
  1770. "https://search.disroot.org",
  1771. "https://searx.cc",
  1772. "https://www.search404.io",
  1773. "https://searx.org",
  1774. "https://searx.site",
  1775. "https://searx.foo.li",
  1776. "https://searx.mxchange.org",
  1777. "https://searx.darklun.ch",
  1778. "https://searx.blackspot.me",
  1779. "https://searx.decatec.de",
  1780. "https://searx.prvcy.eu",
  1781. "https://searx-anon.duckdns.org",
  1782. "https://searx.sunless.cloud",
  1783. "https://searx.fmac.xyz",
  1784. "https://search.gougeul.org",
  1785. "https://spot.ecloud.global",
  1786. "https://searx.ninja",
  1787. "https://searx.ca",
  1788. "https://searx.bar",
  1789. "https://searx.everdot.org",
  1790. "https://searx.ir",
  1791. "https://searx.be",
  1792. "https://searx.aleteoryx.me",
  1793. "https://searx.tunkki.xyz/searx",
  1794. "https://searx.tuxcloud.net",
  1795. "https://searx.underworld.fr",
  1796. "https://xeek.com",
  1797. "https://serx.cf",
  1798. "https://searxng.ch",
  1799. "https://search.st8.at",
  1800. "https://searx.roughs.ru",
  1801. "https://search.datura.network",
  1802. "https://searxng.online",
  1803. "https://search.im-in.space",
  1804. "https://search.zdechov.net",
  1805. "https://searx.ankha.ac",
  1806. "https://search.ngn.tf",
  1807. "https://searx.feneas.org",
  1808. "https://dynabyte.ca",
  1809. "https://search.in.projectsegfau.lt",
  1810. "https://searx.rasp.fr",
  1811. "https://searx.xkek.net",
  1812. "https://engo.mint.lgbt",
  1813. "https://timdor.noip.me/searx",
  1814. "https://trovu.komun.org",
  1815. "https://haku.ahmia.fi",
  1816. "https://searx.lavatech.top",
  1817. "https://searx.slash-dev.de",
  1818. "https://www.webrats.xyz",
  1819. "https://searx.tiekoetter.com",
  1820. "https://paulgo.io",
  1821. "https://searx.hummel-web.at",
  1822. "https://searx.webheberg.info",
  1823. "https://searx.tux.land",
  1824. "https://searx.gnous.eu",
  1825. "https://jsearch.pw",
  1826. "https://search.antonkling.se",
  1827. "https://searx.tk",
  1828. "https://searx.openhoofd.nl",
  1829. "https://searx.nixnet.services",
  1830. "https://searx.zapashcanon.fr",
  1831. "https://search.ethibox.fr",
  1832. "https://searx.theanonymouse.xyz",
  1833. "https://northboot.xyz",
  1834. "https://swag.pw",
  1835. "https://search.mdosch.de",
  1836. "https://sx.fedi.tech",
  1837. "https://s.zhaocloud.net",
  1838. "https://searx.zackptg5.com",
  1839. "https://searx.mha.fi",
  1840. "https://searx.divided-by-zero.eu",
  1841. "https://metasearch.nl",
  1842. "https://search.snopyta.org",
  1843. "https://searx.roflcopter.fr",
  1844. "https://sx.catgirl.cloud",
  1845. "https://searx.mastodontech.de",
  1846. "https://searx.dresden.network",
  1847. "https://darmarit.org/searx",
  1848. "https://suche.uferwerk.org",
  1849. "https://searx.nakhan.net",
  1850. "https://suche.dasnetzundich.de",
  1851. "https://anon.sx",
  1852. "https://nibblehole.com",
  1853. "https://opengo.nl",
  1854. "https://privatesearch.app",
  1855. "https://procurx.pt",
  1856. "https://recherche.catmargue.org",
  1857. "https://search.076.ne.jp",
  1858. "https://search.anonymize.com",
  1859. "https://search.asynchronousexchange.com",
  1860. "https://search.fedi.life",
  1861. "https://search.stinpriza.org",
  1862. "https://search.trom.tf",
  1863. "https://searx.bissisoft.com",
  1864. "https://searxzh.cn",
  1865. "https://searx.sk",
  1866. "https://searx.nevrlands.de",
  1867. "https://searx.akusov.xyz",
  1868. "https://a.searx.space",
  1869. "https://searx.hardwired.link",
  1870. "https://searx.stuehieyr.com",
  1871. "https://searx.sp-codes.de",
  1872. "https://searx.solusar.de",
  1873. "https://searx.tyil.nl",
  1874. "https://searx.vitanetworks.link",
  1875. "https://searx.zecircle.xyz",
  1876. "https://searx.semipvt.com",
  1877. "https://searx.se",
  1878. "https://searx.sadblog.xyz",
  1879. "https://searx.s1gm4.eu",
  1880. "https://searx.run",
  1881. "https://searx.operationtulip.com",
  1882. "https://searx.pwoss.org",
  1883. "https://searx.gnu.style",
  1884. "https://search.bluelock.org",
  1885. "https://search.jigsaw-security.com",
  1886. "https://www.searxs.eu",
  1887. "https://www.perfectpixel.de/searx",
  1888. "https://wtf.roflcopter.fr/searx",
  1889. "https://searx.thegreenwebfoundation.org",
  1890. "https://search.privacytools.io",
  1891. "https://search.blou.xyz",
  1892. "https://search.kling.gg",
  1893. "https://search.activemail.de",
  1894. "https://searx.al-f.net",
  1895. "https://searx.hsbp.org",
  1896. "https://search.ononoki.org",
  1897. "https://monocles.de",
  1898. "https://search.bka.li",
  1899. "https://searx.puffyan.us",
  1900. "https://searx.pussthecat.org",
  1901. "https://search.bus-hit.me",
  1902. "https://searx.thegpm.org",
  1903. "https://etsi.me",
  1904. "https://search.zzls.xyz",
  1905. "https://opnxng.com",
  1906. "https://searxng.tordenskjold.de",
  1907. "https://searx.alloca.dev",
  1908. // "https://cthd.icu",
  1909. // "https://searx.cthd.icu",
  1910. "https://search.neet.works",
  1911. "https://search.rabbit-company.com",
  1912. "https://searxng.zackptg5.com",
  1913. "https://searx.catfluori.de",
  1914. "https://www.higgssearch.com",
  1915. "https://search.projectsegfau.lt",
  1916. "https://searx.domain.glass",
  1917. "https://recherche.facil.services",
  1918. "https://searx.foss.wtf",
  1919. "https://searx.stemy.me",
  1920. "https://searxng.no-logs.com",
  1921. "https://search.exarius.org",
  1922. "https://priv.au",
  1923. "https://searx.work",
  1924. "https://searx.fi",
  1925. "https://searxng.pavot.ca",
  1926. "https://searx.envs.net",
  1927. // "https://searx.slipfox.xyz",
  1928. "https://searx.simplifiedprivacy.com",
  1929. "https://searx.absturztau.be",
  1930. "https://search.vojkovic.xyz",
  1931. "https://searx.ebnar.xyz",
  1932. "https://searx.jaska.cc",
  1933. "https://search.rootdo.com",
  1934. "https://copp.gg",
  1935. "https://s.mble.dk",
  1936. "https://s.trung.fun",
  1937. "https://search.gcomm.ch",
  1938. "https://search.laksith.dev",
  1939. "https://search.leptons.xyz",
  1940. "https://search.modalogi.com",
  1941. "https://search.rowie.at",
  1942. "https://searx.daetalytica.io",
  1943. "https://searx.zhenyapav.com",
  1944. "https://apps.disroot.org",
  1945. "https://searx.danksquad.org",
  1946. "https://search.privacyredirect.com"
  1947. ],
  1948. "i2p": [
  1949. "http://mqamk4cfykdvhw5kjez2gnvse56gmnqxn7vkvvbuor4k4j2lbbnq.b32.i2p",
  1950. "http://ransack.i2p"
  1951. ],
  1952. "loki": [],
  1953. "tor": [
  1954. "http://eb6w5ctgodhchf3p.onion/searx",
  1955. "http://searchb5a7tmimez.onion",
  1956. "http://7jwxg5rakyfvikpi.onion",
  1957. "http://ulrn6sryqaifefld.onion",
  1958. "http://eb6w5ctgodhchf3p.onion",
  1959. "http://tp7nwuggtryzbla7.onion/searx",
  1960. "http://htk2rvtgj6vv3ppj.onion",
  1961. "http://searx7hcqiogbrhk.onion",
  1962. "http://searx.bsbvtqi5oq2cqzn32zt4cr2f2z2rwots3dq7gmdcnlyqoxko2wx6reqd.onion",
  1963. "http://3afisqjw2rxm6z7mmstyt5rx75qfqrgxnkzftknbp2vhipr2nrmrjdyd.onion",
  1964. "http://searxbgetrkiwxhdwi6svpgh7eotopqyxhbqiokrwzg7dcte44t36kyd.onion",
  1965. "http://suche.xyzco456vwisukfg.onion",
  1966. "http://w5rl6wsd7mzj4bdkbuqvzidet5osdsm5jhg2f7nvfidakfq5exda5wid.onion",
  1967. "http://z34ambyi6makk6ta7ksog2sljly2ctt2sa3apekb7wkllk72sxecdtad.onion",
  1968. "http://search.4bkxscubgtxwvhpe.onion",
  1969. "http://juy4e6eicawzdrz7.onion",
  1970. "http://z5vawdol25vrmorm4yydmohsd4u6rdoj2sylvoi3e3nqvxkvpqul7bqd.onion",
  1971. "http://zbuc3bbzbfdqqo2x46repx2ddajbha6fpsjeeptjhhhhzji3zopxdqyd.onion",
  1972. "http://4n53nafyi77iplnbrpmxnp3x4exbswwxigujaxy3b37fvr7bvlopxeyd.onion",
  1973. "http://f4qfqajszpx5b7itzxt6mb7kj4ktpgbdq7lq6xaiqyqx6a7de3epptad.onion",
  1974. "http://searx.cwuzdtzlubq5uual.onion",
  1975. "http://searx3aolosaf3urwnhpynlhuokqsgz47si4pzz5hvb7uuzyjncl2tid.onion",
  1976. "http://rq2w52kyrif3xpfihkgjnhqm3a5aqhoikpv72z3drpjglfzc2wr5z4yd.onion",
  1977. "http://yra4tke2pwcnatxjkufpw6kvebu3h3ti2jca2lcdpgx3mpwol326lzid.onion"
  1978. ],
  1979. "yggdrasil": []
  1980. },
  1981. "simplytranslate": {
  1982. "clearnet": [
  1983. "https://manerakai.asuscomm.com:447",
  1984. "https://translate.riverside.rocks",
  1985. // "https://translate.namazso.eu",
  1986. "https://translate.josias.dev",
  1987. // "https://simplytranslate.pussthecat.org",
  1988. "https://simplytranslate.org",
  1989. "https://simplytranslate.reallyaweso.me",
  1990. "https://translate.northboot.xyz",
  1991. // "https://st.bloatcat.tk",
  1992. // "https://tl.slipfox.xyz",
  1993. "https://tr.chaotic.ninja",
  1994. "https://simplytranslate.esmailelbob.xyz",
  1995. "https://st.manerakai.com",
  1996. "https://translate.syncpundit.com",
  1997. "https://translate.tiekoetter.com",
  1998. "https://simplytranslate.leemoon.network",
  1999. // "https://st.odyssey346.dev",
  2000. "https://st.privacydev.net",
  2001. "https://st.tokhmi.xyz",
  2002. "https://tl.vern.cc",
  2003. // "https://translate.slipfox.xyz"
  2004. ],
  2005. "i2p": [],
  2006. "loki": [],
  2007. "tor": [],
  2008. "yggdrasil": []
  2009. },
  2010. "libretranslate": {
  2011. "clearnet": [
  2012. "https://translate.reallyaweso.me"
  2013. ],
  2014. "i2p": [],
  2015. "loki": [],
  2016. "tor": [],
  2017. "yggdrasil": []
  2018. },
  2019. "spot": {
  2020. "clearnet": [
  2021. "https://search.ggc-project.de"
  2022. ],
  2023. "i2p": [],
  2024. "loki": [],
  2025. "tor": [],
  2026. "yggdrasil": []
  2027. },
  2028. "teddit": {
  2029. "clearnet": [
  2030. "https://teddit.zaggy.nl",
  2031. // "https://teddit.bus-hit.me",
  2032. // "https://teddit.adminforge.de",
  2033. "https://incogsnoo.com",
  2034. // "https://teddit.hostux.net",
  2035. // "https://teddit.ggc-project.de",
  2036. // "https://snoo.ioens.is",
  2037. // "https://teddit.no-logs.com",
  2038. // "https://teddit.net",
  2039. "https://i.opnxng.com",
  2040. // "https://tedd.it",
  2041. "https://teddit.projectsegfau.lt",
  2042. "https://reddit.lol",
  2043. // "https://rdt.trom.tf",
  2044. "https://t.sneed.network",
  2045. "https://teddit.domain.glass",
  2046. // "https://teddit.froth.zone",
  2047. // "https://teddit.namazso.eu",
  2048. // "https://teddit.sethforprivacy.com",
  2049. // "https://teddit.tinfoil-hat.net",
  2050. // "https://teddit.totaldarkness.net",
  2051. "https://td.vern.cc",
  2052. "https://teddit.vern.cc"
  2053. ],
  2054. "i2p": [
  2055. "http://k62ptris7p72aborr4zoanee7xai6wguucveptwgxs5vbgt7qzpq.b32.i2p",
  2056. "http://teddit.i2p"
  2057. ],
  2058. "loki": [],
  2059. "tor": [
  2060. "http://t.sneed4fmhevap3ci4xhf4wgkf72lwk275lcgomnfgwniwmqvaxyluuid.onion",
  2061. "http://tedditfyn6idalzso5wam5qd3kdtxoljjhbrbbx34q2xkcisvshuytad.onion"
  2062. ],
  2063. "yggdrasil": [
  2064. "http://[200:5e4b:515c:e42b:3e73:6fbf:2f11:779d]"
  2065. ]
  2066. },
  2067. "tent": {
  2068. "clearnet": [
  2069. "https://tent.sny.sh",
  2070. // "https://tent.bloatcat.tk"
  2071. ],
  2072. "i2p": [],
  2073. "loki": [],
  2074. "tor": [],
  2075. "yggdrasil": []
  2076. },
  2077. "uso": {
  2078. "clearnet": [
  2079. "https://userscripts-mirror.org"
  2080. ],
  2081. "i2p": [],
  2082. "loki": [],
  2083. "tor": [],
  2084. "yggdrasil": []
  2085. },
  2086. "wayback-classic": {
  2087. "clearnet": [
  2088. "https://wayback-classic.net",
  2089. "https://waybackclassic.esmailelbob.xyz"
  2090. ],
  2091. "i2p": [],
  2092. "loki": [],
  2093. "tor": [
  2094. "http://waybackclassic.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion"
  2095. ],
  2096. "yggdrasil": []
  2097. },
  2098. "whoogle": {
  2099. "clearnet": [
  2100. "https://www.whooglesearch.ml",
  2101. "https://whoogle.privacydev.net",
  2102. "https://whoogle.lunar.icu",
  2103. "https://gowogle.voring.me",
  2104. "https://search.sethforprivacy.com",
  2105. "https://search.albony.xyz",
  2106. "https://www.higgssearch.com",
  2107. "https://google.owacon.moe",
  2108. "https://search.foss.wtf",
  2109. "https://whoogle.dcs0.hu",
  2110. "https://whoogle.ftw.lol",
  2111. "https://s.tokhmi.xyz",
  2112. "https://search.dr460nf1r3.org",
  2113. "https://search.garudalinux.org",
  2114. "https://wgl.frail.duckdns.org",
  2115. "https://wg.vern.cc",
  2116. "https://whoogle.esmailelbob.xyz",
  2117. "https://whoogle.hxvy0.gq",
  2118. "https://whoogle.hostux.net",
  2119. "https://whoogle.no-logs.com"
  2120. ],
  2121. "i2p": [
  2122. "http://verneks7rfjptpz5fpii7n7nrxilsidi2qxepeuuf66c3tsf4nhq.b32.i2p"
  2123. ],
  2124. "loki": [],
  2125. "tor": [
  2126. "http://nuifgsnbb2mcyza74o7illtqmuaqbwu4flam3cdmsrnudwcmkqur37qd.onion",
  2127. "http://whoglqjdkgt2an4tdepberwqz3hk7tjo4kqgdnuj77rt7nshw2xqhqad.onion",
  2128. "http://whoogle.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion",
  2129. "http://whoogle.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"
  2130. ],
  2131. "yggdrasil": []
  2132. },
  2133. "wikiless": {
  2134. "clearnet": [
  2135. "https://wikiless.reallyaweso.me",
  2136. "https://wikiless.org",
  2137. "https://wikiless.sethforprivacy.com",
  2138. // "https://wiki.604kph.xyz",
  2139. "https://wikiless.tiekoetter.com",
  2140. // "https://wikiless.bloatcat.tk",
  2141. "https://wikiless.funami.tech",
  2142. "https://wikiless.privacyredirect.com",
  2143. // "https://wiki.slipfox.xyz",
  2144. "https://wiki.adminforge.de",
  2145. "https://wikiless.esmailelbob.xyz",
  2146. "https://wl.vern.cc",
  2147. "https://wikiless.privacyfucking.rocks",
  2148. "https://w.sneed.network",
  2149. "https://wiki.froth.zone",
  2150. "https://wikiless.lunar.icu",
  2151. "https://wikiless.northboot.xyz",
  2152. "https://wikiless.rootdo.com"
  2153. ],
  2154. "i2p": [
  2155. "http://wikiless.i2p"
  2156. ],
  2157. "loki": [],
  2158. "tor": [
  2159. "http://dj2tbh2nqfxyfmvq33cjmhuw7nb6am7thzd3zsjvizeqf374fixbrxyd.onion",
  2160. "http://w.sneed4fmhevap3ci4xhf4wgkf72lwk275lcgomnfgwniwmqvaxyluuid.onion"
  2161. ],
  2162. "yggdrasil": []
  2163. },
  2164. "everybodyeiki": {
  2165. "clearnet": [
  2166. "https://everybodywiki.com"
  2167. ],
  2168. "i2p": [],
  2169. "loki": [],
  2170. "tor": [],
  2171. "yggdrasil": []
  2172. },
  2173. "wikiwand": {
  2174. "clearnet": [
  2175. "https://www.wikiwand.com"
  2176. ],
  2177. "i2p": [],
  2178. "loki": [],
  2179. "tor": [],
  2180. "yggdrasil": []
  2181. },
  2182. "yacy": {
  2183. "clearnet": [
  2184. "https://yacy.xkek.net",
  2185. "https://yacy.searchlab.eu",
  2186. "https://search.yacy.net",
  2187. "https://www.gumx.de:8091",
  2188. "https://176.31.104.225:8448",
  2189. "https://85.199.74.98:8443",
  2190. "https://109.230.224.225:8443",
  2191. "https://51.79.164.235:8443",
  2192. "https://5.9.162.64:8443",
  2193. "https://76.9.226.109:8444",
  2194. "https://98.100.109.188:8443",
  2195. "https://78.55.177.108:8443",
  2196. "https://114.93.187.9:8443",
  2197. "https://162.210.6.138:8443",
  2198. "https://178.42.9.116:8443",
  2199. "https://185.163.118.182:8443",
  2200. "https://73.194.235.99:8443",
  2201. "https://202.61.255.170:8443",
  2202. "https://78.13.229.60:8443",
  2203. "https://yacy.iko.soy",
  2204. "https://23.233.109.197:8443",
  2205. "https://194.55.12.185:8443",
  2206. "https://81.2.123.206:8443",
  2207. "https://178.254.20.181:8443",
  2208. "https://93.190.202.83:8443",
  2209. "https://58.179.103.130:49153",
  2210. "https://185.243.10.140:8443",
  2211. "https://yacy.zp1.net"
  2212. ],
  2213. "i2p": [
  2214. "http://1search.i2p"
  2215. ],
  2216. "loki": [],
  2217. "tor": [
  2218. "http://yacy.bsbvtqi5oq2cqzn32zt4cr2f2z2rwots3dq7gmdcnlyqoxko2wx6reqd.onion"
  2219. ],
  2220. "yggdrasil": []
  2221. }
  2222. };
  2223.  
  2224. function pageLoader(newUrl) {
  2225. //window.onprogress = (event) => {
  2226. // /questions/6464592/how-to-align-entire-html-body-to-the-center
  2227. const loadPage = '<html><head><link type="image/svg+xml" rel="shortcut icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🥸</text></svg>"><title>Proxy Redirect</title><style>html,body{height:100%;}html{display:table;margin:auto;}body{display:table-cell;vertical-align:middle;}body{background-color:#f1f1f1;font-family:system-ui;cursor:default;user-select:none;max-height:100%;max-width:100%;}#main{font-size:2em;color:#F83600;text-transform:uppercase;position:relative;text-align:center;}#loader{animation:flickerAnimation 2s infinite;font-size:2em;font-weight:bold;}#text{font-size:1em;text-align:center;}#icon{font-size:250%;}.centerm{display:block;margin-left:auto;margin-right:auto;width:100%;}.center{padding:1em 0px 1em 0px;text-align:center;}@keyframes flickerAnimation{0%{opacity:1;}50%{opacity:0;}100%{opacity:1;}}.flip{display:inline-block;transform:scaleX(-1);-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);filter:FlipH;-ms-filter:FlipH;}</style></head><body><div id="message" class="center"></div><div id="loader" class="center">Redirecting...</div><div id="text">You are now being redirected to a privacy proxy frontend.</div><div id="icon" class="center">🥸</div></body></html>';
  2228. //const loadPage = '<html><head><link type="image/svg+xml" rel="shortcut icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🥸</text></svg>"><title>Proxy Redirect</title><style>html,body{height:100%;}html{display:table;margin:auto;}body{display:table-cell;vertical-align:middle;}body{background-color:#f1f1f1;font-family:"Helvetica Neue", Helvetica,Arial,sans-serif;cursor:default;user-select:none;max-height:100%;max-width:100%;}div{font-size:2.3em;font-weight:bold;}#icon-tc:before{content:"🔀";font-size:4em;display:flow-root;text-align:center;}#icon-tc{font-size:3em;}#main{font-size:2em;color:#F83600;text-transform:uppercase;position:relative;text-align:center;}#loader{font-style:italic;animation:flickerAnimation 1s infinite;}.centerm{display:block;margin-left:auto;margin-right:auto;width:100%;}.center{padding:1em 0px 1em 0px;text-align:center;}@keyframes flickerAnimation{0%{opacity:1;}50%{opacity:0;}100%{opacity:1;}}.flip{display:inline-block;transform:scaleX(-1);-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);filter:FlipH;-ms-filter:FlipH;}</style></head><body><div id="icon-tc"></div><div id="message" class="center"></div><div id="loader" class="center">Redirecting...</div></body></html>';
  2229. //const loadPage = '<html><head><link type="image/svg+xml" rel="shortcut icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🥸</text></svg>"><title>Proxy Redirect</title><meta http-equiv="content-type" content="text/html;charset=utf-8" /><meta name="generator" content="Clear Cinema Player" /><style>body {background-color:#efefef;font-family:"Helvetica Neue", Helvetica,Arial,sans-serif; cursor: default; user-select: none;max-height:100%;max-width:100%;}div{font-size:2.3em;font-weight:bold;}#icon-tc:before{content:"🔀";font-size:4em;display:flow-root;text-align:center;}#icon-tc{font-size:3em;}#main{font-size:2em;color:#F83600;text-transform:uppercase;position:relative;text-align:center;}#loader{font-style: italic;animation:flickerAnimation 1s infinite;} #wait, #reload, #footer {font-size:14px;font-weight:normal;} #wait {font-style: italic;} .centerm {display:block;margin-left:auto;margin-right:auto;width:100%;}.center{padding:1em 0px 1em 0px;text-align:center;/* border: 3px solid green; */}@keyframes flickerAnimation {0%{opacity:1;}50%{opacity:0;}100% {opacity:1;}}.flip {display: inline-block; transform: scaleX(-1); -moz-transform: scaleX(-1); -o-transform: scaleX(-1); -webkit-transform: scaleX(-1); filter: FlipH; -ms-filter: FlipH;}</style></head><body><div id="intro" class="center">Proxy Redirect</div><div id="icon-tc" onclick="(function(){document.location = document.location})();"></div><div id="loader" class="center">Redirecting...</div><div id="wait" class="center">Please wait while our monkeys find a working proxy</div><div id="reload" class="center" onclick="(function(){document.location = document.location})();"></div><div id="footer" class="center">Made with <a href="https://falkon.org">Falkon</a> web browser (<a href="https://openuserjs.org/scripts/sjehuda/Proxy_Redirect/issues">Report issue</a>)</div></body></html>';
  2230. const domParser = new DOMParser();
  2231. const newDocument = domParser.parseFromString(loadPage, 'text/html');
  2232. //newDocument.querySelector('#icon-tc').onclick = () => {disable()}; // FIXME
  2233. //newDocument.querySelector('#icon-tc').addEventListener("click", disable, false);
  2234. const insertDocument = document.importNode(newDocument.documentElement, true);
  2235. const removeDocument = document.documentElement;
  2236. document.replaceChild(insertDocument, removeDocument);
  2237. setTimeout(message(newUrl), 9000); // FIXME
  2238. }
  2239.  
  2240. function message(newUrl) {
  2241. location.href = newUrl;
  2242. var div = document.querySelector('#message');
  2243. if (div) {
  2244. div.innerHTML = `Proceed to ${newUrl.hostname}`;
  2245. div.onclick = () => {location.href = newUrl};
  2246. try {
  2247. document.querySelector('#loader').remove();
  2248. } catch (err) {
  2249. console.warn('No element with Id #loader');
  2250. console.warn(err);
  2251. }
  2252. } else {
  2253. location.href = 'https://openuserjs.org/scripts/sjehuda/Proxy_Redirect?autoredirect';
  2254. }
  2255. }
  2256.  
  2257. function noRespond(url) {
  2258. var div = document.querySelector('#message');
  2259. div.id = 'message-error';
  2260. div.innerHTML = `Proxy list appears to be out of date. Proceed to <a href="${url + '#noredirect'}">${url}</a> or update <a href="https://openuserjs.org/scripts/sjehuda/Proxy_Redirect">Proxy Redirect</a>`;
  2261. //div.onclick = () => {location.href = location.href + '#noredirect'; location.reload()};
  2262. //var div = document.querySelector('#loader');
  2263. //div.innerHTML = '🥸 Update Proxy Redirect';
  2264. //div.onclick = () => {location.href = 'https://openuserjs.org/scripts/sjehuda/Proxy_Redirect'};
  2265. }
  2266.  
  2267. // FIXME
  2268. // /questions/1397329/how-to-remove-the-hash-from-window-location-url-with-javascript-without-page-r
  2269. function disable() {
  2270. window.location.href =
  2271. window.location.href.substr(
  2272. 0,
  2273. window.location.href.indexOf('#'))
  2274. + '#noredirect';
  2275. }
  2276.  
  2277. /*
  2278. loop = setInterval(function() {
  2279. //modifyURL(location.href);
  2280. window.open(newURL,'_self');
  2281. //location.href = newURL;
  2282. console.info('Redirecting to ' + newURL);
  2283. clearInterval(loop);
  2284. }, 1000);
  2285. */
  2286.  
  2287. /*
  2288. function modifyURL() {
  2289. inst = pickURL();
  2290. // make function synchronous
  2291. // /questions/8778267/synchronous-gm-xmlhttprequest-acting-asynchronously
  2292. stat = statRES(inst);
  2293. if (stat.match(200)) {
  2294. newURL = settURL();
  2295. } else {
  2296. pickURL(url);
  2297. }
  2298. return newURL;
  2299. }
  2300. */
  2301.  
  2302. //(window.onload = alert()
  2303.  
  2304. // TODO Nested elements (i.e. element "a" inside another element)
  2305. // See "else if e.target.hasChildNodes()"
  2306.  
  2307. (function addEventListeners() {
  2308. document.addEventListener("DOMContentLoaded",
  2309. function() {
  2310. for (linkElement of document.links) {
  2311. // mouseover works with keyboard too
  2312. linkElement.addEventListener("mouseover",
  2313. async function(e) {
  2314. if (e.target && e.target.nodeName == "A") {
  2315. hyperLink = e.target;
  2316. await xhrHyperLink(hyperLink);
  2317. } // else if e.target.hasChildNodes()
  2318. },
  2319. {
  2320. once: true
  2321. }
  2322. );
  2323. }
  2324. }
  2325. );
  2326. })();
  2327.  
  2328. function linkOnError(node) {
  2329. node.style.color = 'orange';
  2330. node.style.fontStyle = 'italic';
  2331. node.title = 'Proxy state check was not possible. Please refresh and try again in case the offered page is offline.';
  2332. }
  2333.  
  2334. function linkOnFail(node) {
  2335. node.style.color = 'red';
  2336. node.style.fontStyle = 'italic';
  2337. node.title = 'No proxy was found. Using Farside to intermediate proxy.';
  2338. }
  2339.  
  2340. function linkOnProgress(node) {
  2341. node.style.color = 'aquamarine';
  2342. node.title = 'Looking up for online proxy... Please wait.';
  2343. }
  2344.  
  2345. function linkOnSuccess(node) {
  2346. text = node.textContent
  2347. node.textContent = `🥸 ${text}`; // TODO enable once removeEventListener is solved.
  2348. node.title = 'Proxy link has been found!';
  2349. //node.removeAttribute('title');
  2350. node.style.color = 'forestgreen'; // TODO remove once removeEventListener is solved.
  2351. node.style.fontWeight = 'bold'; // TODO remove once removeEventListener is solved.
  2352. //node.removeAttribute('style'); // TODO enable once removeEventListener is solved.
  2353. }
  2354.  
  2355. function isValid(url, node) {
  2356. try {
  2357. url = new URL(url);
  2358. } catch (err) {
  2359. return;
  2360. }
  2361. let hostName = url.hostname;
  2362. let pathName = url.pathname;
  2363. // check by excluded
  2364. for (let i = 0; i < urlsMatchers.exclude.length; i++) {
  2365. //if (hostName.endsWith(urlsMatchers.exclude[i].host)) {
  2366. //if (hostName.match(urlsMatchers.exclude[i].host)) {
  2367. if (hostName == urlsMatchers.exclude[i].host ||
  2368. hostName == 'www.' + urlsMatchers.exclude[i].host) {
  2369. for (let j = 0; j < urlsMatchers.exclude[i].path.length; j++) {
  2370. if (pathName.includes('/' + urlsMatchers.exclude[i].path[j])) {
  2371. return 0; // exit further check
  2372. }
  2373. }
  2374. if (node) {
  2375. let text = node.outerText;
  2376. if (urlsMatchers.exclude[i].text) {
  2377. for (let j = 0; j < urlsMatchers.exclude[i].text.length; j++) {
  2378. if (text.match(urlsMatchers.exclude[i].text[j])) {
  2379. return 0; // exit further check
  2380. }
  2381. }
  2382. }
  2383. }
  2384. }
  2385. }
  2386. // continue to includeByHostname
  2387. for (let i = 0; i < urlsMatchers.includeByHostname.length; i++) {
  2388. // perhaps use 'match' and create a new object.array for domains with multiple subdomains
  2389. if (hostName == urlsMatchers.includeByHostname[i].host ||
  2390. hostName == 'www.' + urlsMatchers.includeByHostname[i].host) {
  2391. //if (hostName.endsWith(urlsMatchers.includeByHostname[i].host)) {
  2392. return 1;
  2393. }
  2394. }
  2395. // continue to specific
  2396. for (let i = 0; i < urlsMatchers.includeByPathname.length; i++) {
  2397. if (hostName.endsWith(urlsMatchers.includeByPathname[i].host)) {
  2398. for (let j = 0; j < urlsMatchers.includeByPathname[i].path.length; j++) {
  2399. if (pathName.startsWith('/' + urlsMatchers.includeByPathname[i].path[j])) {
  2400. return 1;
  2401. }
  2402. }
  2403. }
  2404. }
  2405. // continue to second-level-domain
  2406. for (let i = 0; i < urlsMatchers.includeBySLD.length; i++) {
  2407. partedHost = hostName.split('.');
  2408. partedHost.shift();
  2409. if (partedHost.join('.').match(urlsMatchers.includeBySLD[i].host)) {
  2410. //if (partedHost[partedHost.length-2].match(urlsMatchers.includeBySLD[i].host)) {
  2411. return 1;
  2412. }
  2413. }
  2414. // continue to second-level-domain and path
  2415. for (let i = 0; i < urlsMatchers.includeByPathnameAndSLD.length; i++) {
  2416. partedHost = hostName.split('.');
  2417. // TODO Test
  2418. if (partedHost[partedHost.length-2].match(urlsMatchers.includeByPathnameAndSLD[i].host)) {
  2419. for (let j = 0; j < urlsMatchers.includeByPathnameAndSLD[i].path.length; j++) {
  2420. if (pathName.startsWith('/' + urlsMatchers.includeByPathnameAndSLD[i].path[j])) {
  2421. return 1;
  2422. }
  2423. }
  2424. }
  2425. }
  2426. }
  2427.  
  2428. // var caller = (function xhr() {
  2429. async function xhrHyperLink(node) {
  2430. let url = node.href;
  2431. let valid = isValid(url, node);
  2432. if (!valid) {return;}
  2433. //let url = node.href;
  2434. //if (!url) {return;}
  2435. let instanceSelect = await pickInstance(url);
  2436. let result = await pickURL(instanceSelect);
  2437. if (!result) {return;}
  2438. let instanceName = result.name;
  2439. let instanceType = result.type;
  2440. let instanceUrl = result.url;
  2441. if (!url) {return;}
  2442. let newPath = modifyPathname(instanceName, url);
  2443. let newUrl = new URL(instanceUrl + newPath);
  2444. let counter = 0;
  2445.  
  2446. console.log(`
  2447. Setting Proxy to ${instanceName}
  2448. URL: ${newUrl}
  2449. `);
  2450.  
  2451. console.log(`
  2452. URL: ${url}
  2453. Selected: ${instanceUrl}
  2454. Pathname: ${newPath}
  2455. `);
  2456.  
  2457. try {
  2458. gmXmlhttpRequest({
  2459. method: 'GET',
  2460. url: instanceUrl,
  2461. synchronous: true,
  2462. onprogress: linkOnProgress(node),
  2463. onload: function(response) {
  2464. if (response.finalUrl.startsWith(instanceUrl) && response.status == 200) {
  2465. newPath = modifyPathname(instanceName, url);
  2466. newUrl = new URL(instanceUrl + newPath);
  2467. node.href = newUrl;
  2468. linkOnSuccess(node)
  2469. } else {
  2470. instanceUrlPrint = instanceUrl.slice(instanceUrl.lastIndexOf('/')+1);
  2471. instanceUrlPrint = instanceUrlPrint.replace(/\./g,'-');
  2472. console.warn('Instance URL ' + instanceUrl + ' might be out of service. URL has changed. Please report this to the developer.');
  2473. if (maxAttempts(instanceName, instanceType, counter)) {
  2474. instanceUrl = farSide(instanceName, instanceUrl);
  2475. newPath = modifyPathname(instanceName, url);
  2476. node.href = new URL(instanceUrl + newPath);
  2477. linkOnFail(node);
  2478. return;
  2479. }
  2480. maxAttempts(instanceName, instanceType, counter);
  2481. xhr();
  2482. }
  2483. },
  2484. onerror: function(response) {
  2485. instanceUrlPrint = instanceUrl.slice(instanceUrl.lastIndexOf('/')+1);
  2486. instanceUrlPrint = instanceUrlPrint.replace(/\./g,'-');
  2487. console.warn('Instance URL ' + instanceUrl + ' might be offline. Status error: ' + response.status + '. Please report this to the developer.');
  2488. instanceUrl = farSide(instanceName, instanceUrl);
  2489. newPath = modifyPathname(instanceName, url);
  2490. node.href = new URL(instanceUrl + newPath);
  2491. linkOnError(node);
  2492. if (maxAttempts(instanceName, instanceType, counter)) {
  2493. instanceUrl = farSide(instanceName, instanceUrl);
  2494. newPath = modifyPathname(instanceName, url);
  2495. node.href = new URL(instanceUrl + newPath);
  2496. linkOnFail(node);
  2497. return;
  2498. }
  2499. maxAttempts(instanceName, instanceType, counter);
  2500. xhr();
  2501. }
  2502. });
  2503. } catch (err) {
  2504. console.warn(err);
  2505. console.info('API GM.xmlHttpRequest does not seem to be available. Defaulting to Farside.link. Contribute your help in C++ to improve Greasemonkey for Falkon https://bugs.kde.org/show_bug.cgi?id=466533');
  2506. //pickURL();
  2507. instanceUrl = farSide(instanceName, instanceUrl);
  2508. //if ((proxy[instanceName].clearnet).filter(str => str.includes('farside.link')).length) {
  2509. // instanceUrl = (proxy[instanceName].clearnet).filter(str => str.includes('farside.link'))[0];
  2510. //}
  2511. newPath = modifyPathname(instanceName, url);
  2512. node.href = new URL(instanceUrl + newPath);
  2513. }
  2514. }
  2515.  
  2516. // var caller = (function xhr() {
  2517. var init = (async function xhrAddressBar() {
  2518. let url = document.location.href;
  2519. if (!url) {return;}
  2520. let valid = isValid(url);
  2521. if (!valid) {return;}
  2522. let instanceSelect = await pickInstance(url);
  2523. let result = await pickURL(instanceSelect);
  2524. if (!result) {return;}
  2525. let instanceName = result.name;
  2526. let instanceType = result.type;
  2527. let instanceUrl = result.url;
  2528. if (!url) {return;}
  2529. let newPath = modifyPathname(instanceName, url);
  2530. let newUrl = new URL(instanceUrl + newPath);
  2531. let counter = 0;
  2532.  
  2533. console.log(`
  2534. Setting Proxy to ${instanceName}
  2535. URL: ${newUrl}
  2536. `);
  2537.  
  2538. console.log(`
  2539. URL: ${url}
  2540. Selected: ${instanceUrl}
  2541. Pathname: ${newPath}
  2542. `);
  2543.  
  2544. try {
  2545. gmXmlhttpRequest({
  2546. method: 'GET',
  2547. url: instanceUrl,
  2548. synchronous: true,
  2549. onprogress: pageLoader(newUrl),
  2550. onload: function(response) {
  2551. // FIXME wiki.slipfox.xyz and wikiless.bloatcat.tk are selected albeit none should be selected.
  2552. if (response.finalUrl.startsWith(instanceUrl) && response.status == 200) {
  2553. newPath = modifyPathname(instanceName, url);
  2554. newUrl = new URL(instanceUrl + newPath);
  2555. location.href = newUrl;
  2556. } else {
  2557. instanceUrl = instanceUrl.slice(instanceUrl.lastIndexOf('/')+1);
  2558. instanceUrl = instanceUrl.replace(/\./g,'-');
  2559. console.warn('Instance URL ' + instanceUrl + ' might be out of service. URL has changed. Please report this to the developer.');
  2560. if (maxAttempts(instanceName, instanceType, counter)) {
  2561. noRespond(url);
  2562. return;
  2563. }
  2564. maxAttempts(instanceName, instanceType, counter);
  2565. xhr();
  2566. }
  2567. },
  2568. onerror: function(response) {
  2569. instanceUrl = instanceUrl.slice(instanceUrl.lastIndexOf('/')+1);
  2570. instanceUrl = instanceUrl.replace(/\./g,'-');
  2571. console.warn('Instance URL ' + instanceUrl + ' might be offline. Status error: ' + response.status + '. Please report this to the developer.');
  2572. if (maxAttempts(instanceName, instanceType, counter)) {
  2573. noRespond(url);
  2574. return;
  2575. }
  2576. maxAttempts(instanceName, instanceType, counter);
  2577. xhr();
  2578. }
  2579. });
  2580. } catch (err) {
  2581. console.warn(err);
  2582. console.info('API GM.xmlHttpRequest does not seem to be available. Defaulting to Farside.link. Contribute your help in C++ to improve Greasemonkey for Falkon https://bugs.kde.org/show_bug.cgi?id=466533');
  2583. //pickURL();
  2584. instanceUrl = farSide(instanceName, instanceUrl);
  2585. //if ((proxy[instanceName].clearnet).filter(str => str.includes('farside.link')).length) {
  2586. // instanceUrl = (proxy[instanceName].clearnet).filter(str => str.includes('farside.link'))[0];
  2587. //}
  2588. newPath = modifyPathname(instanceName, url);
  2589. location.href = new URL(instanceUrl + newPath);
  2590. }
  2591. })();
  2592.  
  2593. function farSide(instanceName, instanceUrl) {
  2594. switch (instanceName) {
  2595. case '4get':
  2596. instanceUrl = 'https://farside.link/4get';
  2597. break;
  2598. case 'anonymousoverflow':
  2599. instanceUrl = 'https://farside.link/anonymousoverflow';
  2600. break;
  2601. case 'bibliogram':
  2602. instanceUrl = 'https://farside.link/bibliogram';
  2603. break;
  2604. case 'breezewiki':
  2605. instanceUrl = 'https://farside.link/breezewiki';
  2606. break;
  2607. case 'dumb':
  2608. instanceUrl = 'https://farside.link/dumb';
  2609. break;
  2610. case 'gothub':
  2611. instanceUrl = 'https://farside.link/gothub';
  2612. break;
  2613. case 'invidious':
  2614. instanceUrl = 'https://farside.link/invidious';
  2615. break;
  2616. case 'librarian':
  2617. instanceUrl = 'https://farside.link/librarian';
  2618. break;
  2619. case 'libreddit':
  2620. instanceUrl = 'https://farside.link/libreddit';
  2621. break;
  2622. case 'libremdb':
  2623. instanceUrl = 'https://farside.link/libremdb';
  2624. break;
  2625. case 'librex':
  2626. instanceUrl = 'https://farside.link/librex';
  2627. break;
  2628. case 'librey':
  2629. instanceUrl = 'https://farside.link/librey';
  2630. break;
  2631. case 'lingva':
  2632. instanceUrl = 'https://farside.link/lingva';
  2633. break;
  2634. case 'nitter':
  2635. instanceUrl = 'https://farside.link/nitter';
  2636. break;
  2637. case 'piped':
  2638. instanceUrl = 'https://farside.link/piped';
  2639. break;
  2640. case 'proxigram':
  2641. instanceUrl = 'https://farside.link/proxigram';
  2642. break;
  2643. case 'proxitok':
  2644. instanceUrl = 'https://farside.link/proxitok';
  2645. break;
  2646. case 'quetre':
  2647. instanceUrl = 'https://farside.link/quetre';
  2648. break;
  2649. case 'redlib':
  2650. instanceUrl = 'https://farside.link/redlib';
  2651. break;
  2652. case 'rimgo':
  2653. instanceUrl = 'https://farside.link/rimgo';
  2654. break;
  2655. case 'scribe':
  2656. instanceUrl = 'https://farside.link/scribe';
  2657. break;
  2658. case 'searx':
  2659. instanceUrl = 'https://farside.link/searxng';
  2660. break;
  2661. case 'simplytranslate':
  2662. instanceUrl = 'https://farside.link/simplytranslate';
  2663. break;
  2664. case 'teddit':
  2665. instanceUrl = 'https://farside.link/teddit';
  2666. break;
  2667. case 'whoogle':
  2668. instanceUrl = 'https://farside.link/whoogle';
  2669. break;
  2670. case 'wikiless':
  2671. instanceUrl = 'https://farside.link/wikiless';
  2672. break;
  2673. //case 'yacy':
  2674. // instanceUrl = 'https://farside.link/yacy';
  2675. // break;
  2676. }
  2677. return instanceUrl;
  2678. }
  2679.  
  2680. function maxAttempts(instanceName, instanceType, counter) {
  2681. counter = counter + 1;
  2682. if (counter == proxy[instanceName][instanceType].length) {
  2683. return true;
  2684. } else {
  2685. return counter;
  2686. }
  2687. }
  2688.  
  2689. function setValue(para, sourceURL) {
  2690. if (sourceURL.searchParams.get(para)) {
  2691. para = [para];
  2692. return pickParameters(para, sourceURL);
  2693. } else {
  2694. return 'auto';
  2695. }
  2696. }
  2697.  
  2698. function pickParameters(para, sourceURL) {
  2699. for (let i = 0; i < para.length; i++) {
  2700. if (sourceURL.searchParams.get(para[i])) {
  2701. para = sourceURL.searchParams.get(para[i]);
  2702. sourceURL.searchParams.delete(para[i]);
  2703. return para;
  2704. }
  2705. }
  2706. }
  2707.  
  2708. /*
  2709.  
  2710. FIXME Check whether instance is enabled.
  2711. TODO Do not add instance is is disabled,
  2712. so that the redirector will not halt
  2713. when a disabled instance is chosen.
  2714.  
  2715. */
  2716.  
  2717. async function pickInstance(url) {
  2718.  
  2719. let sourceURL = new URL(url);
  2720. let paras = ['continue', 'retpath'];
  2721.  
  2722. for (let i = 0; i < paras.length; i++) {
  2723. if (sourceURL.searchParams.get(paras[i])) {
  2724. //sourceURL = pickParameters(paras[i], sourceURL);
  2725. sourceURL = sourceURL.searchParams.get(paras[i]);
  2726. sourceURL = new URL(sourceURL);
  2727. }
  2728. }
  2729.  
  2730. let hostname = sourceURL.hostname;
  2731. let pathname = sourceURL.pathname;
  2732. let instanceName;
  2733. let instanceNameArray = [];
  2734.  
  2735. switch (true) {
  2736.  
  2737. case hostname == 'bandcamp.com':
  2738. case hostname == 'www.bandcamp.com':
  2739. case hostname.endsWith('.bandcamp.com'):
  2740. instanceName = 'tent';
  2741. break;
  2742.  
  2743. case hostname == 'bilibili.com':
  2744. case hostname == 'www.bilibili.com':
  2745. case hostname.endsWith('.bilibili.com'):
  2746. instanceName = 'mikuinvidious';
  2747. break;
  2748.  
  2749. //case pathname.startsWith('/magnet/') && (hostname == 'bt4g.org' || hostname == 'www.bt4g.org'):
  2750. //case pathname.startsWith('/magnet/') && hostname == 'bt4gprx.com' || hostname == 'www.bt4gprx.com':
  2751. case pathname.startsWith('/hash/') && hostname == 'downloadtorrentfile.com' || hostname == 'www.downloadtorrentfile.com':
  2752. case hostname == 'torrentdownload.info':
  2753. case hostname == 'www.torrentdownload.info':
  2754. case hostname == 'torrentz.eu':
  2755. case hostname == 'www.torrentz.eu':
  2756. case hostname == 'torrentz.me':
  2757. case hostname == 'www.torrentz.me':
  2758. case hostname == 'torrentz2.is':
  2759. case hostname == 'www.torrentz2.is':
  2760. instanceName = 'btdigg';
  2761. break;
  2762.  
  2763. //case hostname == 'fandom.com':
  2764. //case hostname == 'www.fandom.com':
  2765. case hostname.endsWith('.fandom.com'):
  2766. instanceName = 'breezewiki';
  2767. break;
  2768.  
  2769. case hostname == 'github.com':
  2770. case hostname == 'www.github.com':
  2771. case hostname.endsWith('.github.com'):
  2772. instanceName = 'gothub';
  2773. break;
  2774.  
  2775. case hostname == 'gitlab.com':
  2776. case hostname == 'www.gitlab.com':
  2777. instanceName = 'laboratory';
  2778. break;
  2779.  
  2780. case hostname == 'goodreads.com':
  2781. case hostname == 'www.goodreads.com':
  2782. instanceName = 'biblioreads';
  2783. break;
  2784.  
  2785. // TODO quadkey (mapquest)
  2786. // NOTE quadkeyToTile(quadkey) See /mapbox/tilebelt
  2787. case hostname.endsWith('wikimap.toolforge.org'):
  2788. case (hostname.endsWith('moovitapp.com') &&
  2789. sourceURL.search.includes('tll')):
  2790. case (hostname.endsWith('bing.com') &&
  2791. pathname.startsWith('/maps')):
  2792. case (hostname.includes('google.') &&
  2793. pathname.startsWith('/maps')):
  2794. case (hostname.includes('waze.com') &&
  2795. pathname.startsWith('/live-map')):
  2796. case (hostname.includes('waze.com') &&
  2797. pathname.startsWith('/ul')):
  2798. case (hostname.includes('yandex.') &&
  2799. pathname.startsWith('/maps')):
  2800. instanceNameArray.push('facilmap');
  2801. instanceNameArray.push('openstreetmap');
  2802. break;
  2803.  
  2804. case hostname == 'imdb.com':
  2805. case hostname == 'www.imdb.com':
  2806. instanceName = 'libremdb';
  2807. break;
  2808.  
  2809. case hostname == 'imgur.com':
  2810. case hostname == 'www.imgur.com':
  2811. //instanceNameArray.push('imgin');
  2812. instanceNameArray.push('rimgo');
  2813. break;
  2814.  
  2815. case hostname == 'instructables.com':
  2816. case hostname == 'www.instructables.com':
  2817. instanceNameArray.push('destructables');
  2818. instanceNameArray.push('indestructables');
  2819. break;
  2820.  
  2821. case hostname == 'instagram.com':
  2822. case hostname == 'www.instagram.com':
  2823. //instanceNameArray.push('bibliogram');
  2824. instanceNameArray.push('proxigram');
  2825. break;
  2826.  
  2827. //case hostname == 'medium.com':
  2828. //case hostname == 'www.medium.com':
  2829. case hostname == 'medium.com':
  2830. case hostname == 'www.medium.com':
  2831. case hostname.endsWith('.medium.com'):
  2832. instanceNameArray.push('libmedium');
  2833. instanceNameArray.push('scribe');
  2834. break;
  2835.  
  2836. case hostname == 'odysee.com':
  2837. case hostname == 'www.odysee.com':
  2838. instanceName = 'librarian';
  2839. break;
  2840.  
  2841. case hostname == 'quora.com':
  2842. case hostname == 'www.quora.com':
  2843. instanceName = 'quetre';
  2844. break;
  2845.  
  2846. case hostname == 'reddit.com':
  2847. case hostname == 'old.reddit.com':
  2848. case hostname == 'www.reddit.com':
  2849. case hostname == 'preview.redd.it':
  2850. instanceNameArray.push('libreddit');
  2851. instanceNameArray.push('redlib');
  2852. instanceNameArray.push('teddit');
  2853. break;
  2854.  
  2855. case hostname == 'reuters.com':
  2856. case hostname == 'www.reuters.com':
  2857. instanceName = 'neuters';
  2858. break;
  2859.  
  2860. // FIXME
  2861. case (hostname.startsWith('search.yahoo.')):
  2862. //case (pathname.startsWith('/search')):
  2863. case (hostname.includes('yandex.') &&
  2864. pathname.startsWith('/search')):
  2865. case (hostname.includes('yahoo.') &&
  2866. pathname.startsWith('/search')):
  2867. case (hostname.includes('bing.') &&
  2868. pathname.startsWith('/search')):
  2869. case (hostname.includes('google.') &&
  2870. pathname.startsWith('/search')):
  2871. instanceNameArray.push('librex');
  2872. instanceNameArray.push('librey');
  2873. instanceNameArray.push('lieu');
  2874. instanceNameArray.push('metastem');
  2875. instanceNameArray.push('searx');
  2876. instanceNameArray.push('spot');
  2877. instanceNameArray.push('whoogle');
  2878. break;
  2879.  
  2880. case hostname == 'stackoverflow.com':
  2881. case hostname == 'www.stackoverflow.com':
  2882. instanceName = 'anonymousoverflow';
  2883. break;
  2884.  
  2885. case hostname == 'tiktok.com':
  2886. case hostname == 'www.tiktok.com':
  2887. instanceName = 'proxitok';
  2888. break;
  2889.  
  2890. case (hostname.endsWith('translate.yandex.com')):
  2891. // FIXME website blocks us from redirecting
  2892. // function setTimeout() seems to not work
  2893. // consider different approach/way
  2894. case (hostname.endsWith('translate.google.com')):
  2895. instanceNameArray.push('lingva');
  2896. instanceNameArray.push('simplytranslate');
  2897. break;
  2898.  
  2899. case (hostname.endsWith('.tumblr.com')):
  2900. instanceName = 'priviblur';
  2901. break;
  2902.  
  2903. case hostname == 'twitter.com':
  2904. case hostname == 'www.twitter.com':
  2905. case hostname == 'x.com':
  2906. case hostname == 'www.x.com':
  2907. instanceName = 'nitter';
  2908. break;
  2909.  
  2910. case hostname == 'urbandictionary.com':
  2911. case hostname == 'www.urbandictionary.com':
  2912. instanceName = 'ruraldictionary';
  2913. break;
  2914.  
  2915. case hostname == 'userscripts.org':
  2916. case hostname == 'www.userscripts.org':
  2917. instanceName = 'uso';
  2918. break;
  2919.  
  2920. //case hostname == 'wikipedia.org':
  2921. //case hostname == 'www.wikipedia.org':
  2922. case hostname.endsWith('.wikipedia.org'):
  2923. // instanceNameArray.push('everybodywiki');
  2924. // instanceNameArray.push('metastemwiki');
  2925. instanceNameArray.push('wikiless');
  2926. // instanceNameArray.push('wikiwand');
  2927. break;
  2928.  
  2929. case hostname == 'youtu.be':
  2930. case hostname == 'www.youtu.be':
  2931. case hostname == 'youtube.com':
  2932. case hostname == 'www.youtube.com':
  2933. case hostname == 'youtube-nocookie.com':
  2934. case hostname == 'www.youtube-nocookie.com':
  2935. //case hostname.endsWith('invidious-invidious.invidious.svc.cluster.local:3000'):
  2936. instanceNameArray.push('alltube');
  2937. instanceNameArray.push('cloudtube');
  2938. instanceNameArray.push('invidious');
  2939. instanceNameArray.push('piped');
  2940. // //instanceNameArray.push('pipedmaterial');
  2941. instanceNameArray.push('poketube');
  2942. instanceNameArray.push('tubo');
  2943. break;
  2944.  
  2945. //default:
  2946. // return target;
  2947.  
  2948. }
  2949.  
  2950. // proxy select
  2951. if (instanceNameArray.length) {
  2952. instanceName = instanceNameArray[Math.floor(Math.random()*instanceNameArray.length)];
  2953. //urlArray = proxyArray[Math.floor(Math.random()*proxyArray.length)];
  2954. }
  2955.  
  2956. return instanceName;
  2957.  
  2958. }
  2959.  
  2960. function removeParameters(sourceURL) {
  2961.  
  2962. switch (sourceURL.hostname) {
  2963. case 'youtube.com':
  2964. case 'www.youtube.com':
  2965. case 'youtube-nocookie.com':
  2966. case 'www.youtube-nocookie.com':
  2967. sourceURL.searchParams.delete('app')
  2968. break;
  2969. }
  2970.  
  2971. return sourceURL;
  2972.  
  2973. }
  2974.  
  2975. // TODO
  2976. // Settle hostname
  2977. function modifyHostname(instanceName, url) {
  2978. let lang, partedHost;
  2979. let sourceURL = new URL(url);
  2980. let hostname = sourceURL.hostname;
  2981.  
  2982. switch (instanceName) {
  2983.  
  2984. case 'everybodywiki':
  2985. // extract language code
  2986. partedHost = hostname.split('.');
  2987. if (partedHost.length === 3 || partedHost.length === 4) {
  2988. lang = partedHost[0];
  2989. }
  2990. newHostname = `${lang}.everybodywiki.com`;
  2991. sourceURL.hostname = newHostname;
  2992. break;
  2993.  
  2994. }
  2995.  
  2996. return sourceURL;
  2997.  
  2998. }
  2999.  
  3000. // Settle pathname
  3001. function modifyPathname(instanceName, url) {
  3002. let brand, lang, name, newPath, para, partedHost;
  3003. let sourceURL = new URL(url);
  3004. //url = removeParameters(sourceURL);
  3005. let pathname = sourceURL.pathname;
  3006. let hostname = sourceURL.hostname;
  3007. //let parameter = sourceURL.searchParams;
  3008.  
  3009. switch (instanceName) {
  3010.  
  3011. // NOTE This "case" is not required albeit it makes the URL more clear
  3012. case 'alltube':
  3013. cleansedUrl = removeParameters(sourceURL);
  3014. newPath = `/info?url=${cleansedUrl}`;
  3015. break;
  3016.  
  3017. // consider function setTimeout()
  3018. case 'bibliogram':
  3019. if (!pathname.includes('accounts/login')) {
  3020. newPath = `/u/${para}`;
  3021. } else {
  3022. if (sourceURL.searchParams.get('next')) {
  3023. para = ['next'];
  3024. para = pickParameters(para, sourceURL);
  3025. newPath = `/u/${para}`;
  3026. }
  3027. }
  3028. break;
  3029.  
  3030. case 'breezewiki':
  3031. // extract wiki name
  3032. partedHost = hostname.split('.');
  3033. if (partedHost.length === 3 || partedHost.length === 4) {
  3034. brand = partedHost[0];
  3035. }
  3036. newPath = `/${brand}${pathname}`;
  3037. break;
  3038.  
  3039. case 'btdigg':
  3040. // extract sha1sum
  3041. //hash = pathname.split('/')[2];
  3042. let hash = pathname.split('/');
  3043. for (let i = 0; i < hash.length; i++) {
  3044. if (hash[i].length === 40 || hash[i].length === 33) {
  3045. hash = hash[i];
  3046. break;
  3047. }
  3048. }
  3049. newPath = `/${hash}`;
  3050. break;
  3051.  
  3052. case 'cloudtube':
  3053. case 'invidious':
  3054. case 'piped':
  3055. case 'pipedmaterial':
  3056. case 'poketube':
  3057. if (sourceURL.searchParams.get('v')) {
  3058. para = ['v'];
  3059. para = pickParameters(para, sourceURL);
  3060. newPath = `/watch?v=${para}`;
  3061. }
  3062. break;
  3063.  
  3064. case 'libreddit':
  3065. case 'redlib':
  3066. case 'teddit':
  3067. let newPathPart;
  3068. if (instanceName == 'teddit') {
  3069. newPathPart = '/pics/w:null_';
  3070. } else {
  3071. newPathPart = '/img/';
  3072. }
  3073. if (hostname == 'preview.redd.it') {
  3074. newPath = `${newPathPart}${pathname}`;
  3075. } else
  3076. if (hostname.endsWith('reddit.com') && pathname == '/media' && sourceURL.searchParams.get('url')) {
  3077. let extractedURL = new URL(sourceURL.searchParams.get('url'))
  3078. if (extractedURL.hostname == 'preview.redd.it') {
  3079. extractedPathname = extractedURL.pathname.split('-').pop();
  3080. extractedPathname = extractedPathname.replace('/','');
  3081. newPath = `${newPathPart}${extractedPathname}`;
  3082. }
  3083. }
  3084. break;
  3085.  
  3086. case 'gothub':
  3087. if (hostname.endsWith('gist.github.com')) {
  3088. newPath = `/gist${pathname}`;
  3089. }
  3090. break;
  3091.  
  3092. case 'laboratory':
  3093. newPath = '/' + hostname + pathname;
  3094. break;
  3095.  
  3096. // case 'libmedium':
  3097. //partedHost = hostname.split('.');
  3098. //if (partedHost.length === 3 || partedHost.length === 4) {
  3099. // name = partedHost[0];
  3100. //}
  3101. //newPath = `/@${name}${pathname}`;
  3102. // newPath = pathname;
  3103. // break;
  3104.  
  3105. case 'librex':
  3106. case 'metastem':
  3107. case 'spot':
  3108. // extract search parameter
  3109. para = ['q', 'text', 'p'];
  3110. para = pickParameters(para, sourceURL);
  3111. newPath = `/search.php?q=${para}`;
  3112. break;
  3113.  
  3114. case 'lingva':
  3115. // extract text parameter
  3116. let paras = ['sl', 'tl', 'text'];
  3117.  
  3118. for (let i = 0; i < paras.length; i++) {
  3119. paras[i] = setValue(paras[i], sourceURL);
  3120. }
  3121.  
  3122. //if (paras[2] === 'auto') { paras[2] = ''; }
  3123.  
  3124. if ((paras[0] == 'auto') && (paras[1] == 'auto')) {
  3125. newPath = `/${paras[2]}`;
  3126. } else {
  3127. newPath = `/${paras[0]}/${paras[1]}/${paras[2]}`;
  3128. }
  3129. break;
  3130.  
  3131. case 'facilmap':
  3132. case 'openstreetmap':
  3133. // extract coordinations
  3134. /*
  3135. if (pathname.includes('@')) {
  3136. cord = pathname.split('/')[2].split('&')[0].slice(1);
  3137. cord = cord.split(',');
  3138. }
  3139. newPath = '/#map=' + cord[2].slice(0, 1) +
  3140. '/' + cord[0] + '/' + cord[1];
  3141. */
  3142. let cord, lat, lon, zoom;
  3143. // extract coordinations
  3144. if (sourceURL.search.includes('%7E')) { // %7E is ~
  3145. para = ['cp'];
  3146. cord = pickParameters(para, sourceURL);
  3147. cord = cord.split('~');
  3148. para = ['lvl'];
  3149. zoom = pickParameters(para, sourceURL);
  3150. lat = cord[0];
  3151. lon = cord[1];
  3152. } else
  3153. if (sourceURL.search.includes('to')) {
  3154. para = ['to'];
  3155. cord = pickParameters(para, sourceURL);
  3156. cord = cord.slice(3).split(',');
  3157. lat = cord[0];
  3158. lon = cord[1];
  3159. } else
  3160. if (pathname.includes('ul') &&
  3161. sourceURL.search.includes('ll')) {
  3162. para = ['ll'];
  3163. cord = pickParameters(para, sourceURL);
  3164. cord = cord.split(',');
  3165. para = ['zoom'];
  3166. zoom = pickParameters(para, sourceURL);
  3167. lat = cord[0];
  3168. lon = cord[1];
  3169. } else
  3170. if (sourceURL.search.includes('ll')) {
  3171. para = ['ll'];
  3172. cord = pickParameters(para, sourceURL);
  3173. cord = cord.split(',');
  3174. para = ['z'];
  3175. zoom = pickParameters(para, sourceURL);
  3176. lat = cord[0];
  3177. lon = cord[1];
  3178. } else
  3179. if (sourceURL.search.includes('tll')) {
  3180. para = ['tll'];
  3181. cord = pickParameters(para, sourceURL);
  3182. cord = cord.split('_');
  3183. lat = cord[0];
  3184. lon = cord[1];
  3185. } else
  3186. if (pathname.includes('@')) {
  3187. partedPath = pathname.split('/')
  3188. for (let i = 0; i < partedPath.length; i++) {
  3189. if (partedPath[i].startsWith('@')) {
  3190. cord = partedPath[i].split(',');
  3191. }
  3192. }
  3193. lat = cord[0].slice(1);
  3194. lon = cord[1];
  3195. zoom = cord[2];
  3196. //newPath = `/#map=${cord[2].slice(0, 2)}/${cord[0].slice(1)}/${cord[1]}`;
  3197. //newPath = `/#map=${cord[2]}/${cord[0].slice(1)}/${cord[1]}`;
  3198. //newPath = `/#${cord[2]}/${cord[0].slice(1)}/${cord[1]}/`;
  3199. }
  3200.  
  3201. if (lat && lon && zoom) {
  3202. newPath = `/#${zoom}/${lat}/${lon}/`;
  3203. } else
  3204. if (lat && lon && !zoom) {
  3205. newPath = `/#10/${lat}/${lon}/`;
  3206. }
  3207.  
  3208. if (!newPath && sourceURL.searchParams.get('q')) {
  3209. para = ['q'];
  3210. para = pickParameters(para, sourceURL);
  3211. newPath = `/search?query=${para}`;
  3212. instanceUrl = 'https://www.openstreetmap.org'; // TODO Check why this line exist
  3213. }
  3214. break;
  3215.  
  3216. case 'lieu':
  3217. case 'searx':
  3218. case 'whoogle':
  3219. // extract search parameter
  3220. para = ['q', 'text', 'p'];
  3221. para = pickParameters(para, sourceURL);
  3222. newPath = `/search?q=${para}`;
  3223. break;
  3224.  
  3225. case 'metastemwiki':
  3226. // extract language code
  3227. partedHost = hostname.split('.');
  3228. if (partedHost.length === 3 || partedHost.length === 4) {
  3229. lang = partedHost[0];
  3230. }
  3231. newPath = `/#${pathname}/${lang}`;
  3232. break;
  3233.  
  3234. case 'mikuinvidious':
  3235. if (!hostname.startsWith('www.')) {
  3236. partedHost = hostname.split('.');
  3237. if (partedHost.length === 3 || partedHost.length === 4) {
  3238. name = partedHost[0];
  3239. }
  3240. newPath = `/${name}${pathname}`;
  3241. }
  3242. break;
  3243.  
  3244. case 'priviblur':
  3245. if (hostname == '64.media.tumblr.com') {
  3246. newPath = `/tblr/media/64${pathname}`;
  3247. } else {
  3248. partedHost = hostname.split('.');
  3249. if (partedHost.length === 3 || partedHost.length === 4) {
  3250. subname = partedHost[0];
  3251. }
  3252. pathname = pathname.replace('/image/', '/post/');
  3253. if (pathname == '/library') {pathname = '';}
  3254. if (subname == 'www') {subname = '';}
  3255. newPath = `/${subname}${pathname}`;
  3256. }
  3257. break;
  3258.  
  3259. case 'tent':
  3260. partedHost = hostname.split('.');
  3261. if (partedHost.length === 3 || partedHost.length === 4) {
  3262. artist = partedHost[0];
  3263. }
  3264. partedPath = pathname.split('/');
  3265. type = partedPath[1];
  3266. name = partedPath[2];
  3267. if (name) {
  3268. newPath = `/release.php?artist=${artist}&type=${type}&name=${name}`;
  3269. } else {
  3270. newPath = `/release.php?artist=${artist}&type=${type}`;
  3271. }
  3272. break;
  3273.  
  3274. case 'wikiless':
  3275. // extract language code
  3276. partedHost = hostname.split('.');
  3277. if (partedHost.length === 3 || partedHost.length === 4) {
  3278. lang = partedHost[0];
  3279. }
  3280. newPath = `${pathname}?lang=${lang}`;
  3281. break;
  3282.  
  3283. case 'wikiwand':
  3284. // extract language code
  3285. partedHost = hostname.split('.');
  3286. if (partedHost.length === 3 || partedHost.length === 4) {
  3287. lang = partedHost[0];
  3288. }
  3289. partedPath = pathname.split('/');
  3290. pathname = partedPath[2];
  3291. newPath = `/${lang}/${pathname}`;
  3292. break;
  3293.  
  3294. case 'yacy':
  3295. // extract search parameter
  3296. para = ['q', 'text', 'p'];
  3297. //pickParameters(para, sourceURL); // works even when just calling the function?
  3298. para = pickParameters(para, sourceURL);
  3299. newPath = `/yacysearch.html?query=${para}`;
  3300. break;
  3301.  
  3302. }
  3303.  
  3304. if (!newPath || newPath == '/') {
  3305. newPath = pathname + sourceURL.search + sourceURL.hash;
  3306. }
  3307.  
  3308. return newPath;
  3309.  
  3310. }
  3311.  
  3312. (async function registerMenuCommand(){
  3313. try {
  3314. for (let key in proxy) {
  3315. let keyValue = await GM.getValue(key, true);
  3316. let icon, status, value;
  3317. if (keyValue) {
  3318. icon = '🔀'
  3319. status = 'on';
  3320. value = false;
  3321. } else {
  3322. icon = '🔁'
  3323. status = 'off';
  3324. value = true;
  3325. }
  3326. await GM.registerMenuCommand(`${icon} ${key} [${status}]`.toUpperCase(), () => toggleStatus(key, value, status));
  3327. }
  3328. for (let key of ['dhttp', 'i2p', 'loki', 'tor', 'veilid', 'yggdrasil']) {
  3329. let keyValue = await GM.getValue(key, false);
  3330. let icon, status, value;
  3331. if (keyValue) {
  3332. icon = '🔒'
  3333. status = 'on';
  3334. value = false;
  3335. } else {
  3336. icon = '🔓'
  3337. status = 'off';
  3338. value = true;
  3339. }
  3340. await GM.registerMenuCommand(`${icon} ${key} system [${status}]`.toUpperCase(), () => toggleStatus(key, value, status), key[0]);
  3341. }
  3342. } catch (err) {
  3343. console.warn(err);
  3344. console.info('API GM.registerMenuCommand does not seem to be available.');
  3345. }
  3346. })();
  3347.  
  3348. async function toggleStatus(key, value, status) {
  3349. await GM.setValue(key, value);
  3350. //alert(`${key} is now ${status}d`)
  3351. //location.reload();
  3352. }
  3353.  
  3354. (function instanceSwitcher(){
  3355. document.addEventListener("DOMContentLoaded",
  3356. async function() {
  3357. let instanceSelect = isInstance();
  3358. if (instanceSelect) {
  3359. infoBar(instanceSelect);
  3360. //proxyButton(instanceSelect);
  3361. reverseURL(location.href);
  3362. await GM.registerMenuCommand(`🎲️ Switch Instance`,
  3363. () => xhrInstanceSwitcher(instanceSelect), 'S'); // ↻ ↯ ↫
  3364. }
  3365. });
  3366. })();
  3367.  
  3368. // TODO
  3369. function reverseURL() {
  3370.  
  3371. // NOTE Useful for bookmarking original URL
  3372.  
  3373. }
  3374.  
  3375. // Check whether current page is a proxy instance
  3376. // If it is, create a menu command and a top bar to switch with another instance.
  3377. function isInstance(){
  3378. for (i in proxy) {
  3379. for (j in proxy[i]) {
  3380. for (k in proxy[i][j]) {
  3381. let url
  3382. url = proxy[i][j][k];
  3383. url = new URL(url);
  3384. if (location.hostname == url.hostname) {
  3385. instanceName = i;
  3386. return instanceName;
  3387. }
  3388. }
  3389. }
  3390. }
  3391. }
  3392.  
  3393. function proxyButton(instanceSelect) {
  3394. let namespace = 'i2p-schimon-proxy-button';
  3395. let bttn = document.createElement(namespace);
  3396. bttn.id = namespace;
  3397. document.body.append(bttn);
  3398. let icon = document.createElement(namespace);
  3399. bttn.append(icon)
  3400. let text = document.createElement(namespace);
  3401. bttn.append(text)
  3402. text.textContent = `Switch ${instanceSelect} instance`;
  3403. // set color
  3404. //text.style.borderWidth = '5px';
  3405. //text.style.borderRadius = '5px';
  3406. //text.style.borderColor = 'red';
  3407. //text.style.background = 'black';
  3408. //text.style.color = 'whitesmoke';
  3409. // set position
  3410. text.style.display = 'none';
  3411. text.style.position = 'fixed';
  3412. text.style.bottom = 0;
  3413. text.style.right = 0;
  3414. text.style.marginTop = '100px';
  3415. text.style.marginRight = '60px';
  3416. text.style.minHeight = '40px';
  3417. // set font
  3418. text.style.fontFamily = 'system-ui';
  3419. text.style.fontSize = '20px';
  3420. text.style.fontStyle = 'italic';
  3421. text.style.fontWeight = 'bold';
  3422. //icon.title = `🥸 Switch ${instanceSelect} instance`;
  3423. // set content
  3424. icon.textContent = '🥸';
  3425. icon.style.all = 'unset';
  3426. // set font
  3427. icon.style.fontFamily = 'system-ui';
  3428. icon.style.fontSize = '20px';
  3429. icon.style.fontWeight = 'bold';
  3430. // set position
  3431. icon.style.position = 'fixed';
  3432. icon.style.bottom = 0;
  3433. icon.style.right = 0;
  3434. // set appearance
  3435. icon.style.marginTop = '100px';
  3436. icon.style.marginRight = '10px';
  3437. icon.style.minWidth = '50px';
  3438. icon.style.minHeight = '50px';
  3439. icon.style.zIndex = 10000;
  3440. icon.style.opacity = 0.5;
  3441. //icon.style.transition = 'all .5s ease .5s';
  3442. // center character
  3443. icon.style.justifyContent = 'center';
  3444. icon.style.alignItems = 'center';
  3445. icon.style.display = 'flex';
  3446. // disable selection marks
  3447. icon.style.outline = 'none';
  3448. bttn.style.userSelect = 'none';
  3449. bttn.style.cursor = 'default';
  3450. bttn.onmouseover = () => {
  3451. //bttn.textContent = `Switch ${instanceSelect} instance 🥸`;
  3452. icon.style.opacity = 'unset';
  3453. text.style.display = 'unset';
  3454. };
  3455. bttn.onmouseleave = () => {
  3456. icon.textContent = `🥸`;
  3457. icon.style.opacity = 0.8;
  3458. text.style.display = 'none';
  3459. };
  3460. bttn.onclick = async () => {
  3461. await xhrInstanceSwitcher(instanceSelect);
  3462. };
  3463. }
  3464.  
  3465. function getOriginalLink(instanceSelect) {
  3466. let lang, originalLink, originalPath, splitPathname;
  3467. let sourceURL = new URL(location.href);
  3468. let pathname = sourceURL.pathname;
  3469. pathname = pathname.replace('//', '/');
  3470. //let hostname = sourceURL.hostname;
  3471. switch (instanceSelect) {
  3472. case 'alltube':
  3473. originalLink = sourceURL.searchParams.get('url').replace('/www.','/');
  3474. break;
  3475. case 'anonymousoverflow':
  3476. // NOTE Not good due to I2P and onion not having HTTP(S)
  3477. //sourceURL.hostname = 'stackoverflow.com';
  3478. //originalLink = sourceURL;
  3479. originalLink = `https://stackoverflow.com${pathname}`;
  3480. break;
  3481. case 'biblioreads':
  3482. originalLink = `https://goodreads.com${pathname}`;
  3483. break;
  3484. case 'breezewiki':
  3485. splitPathname = pathname.split('/');
  3486. splitPathname.shift();
  3487. let brand = splitPathname.shift();
  3488. originalPath = splitPathname.join('/');
  3489. originalLink = `https://${brand}.fandom.com/${originalPath}`;
  3490. break;
  3491. case 'btdigg':
  3492. if (location.href.includes('/search?')) {
  3493. originalLink = sourceURL;
  3494. } else {
  3495. hash = pathname.split('/')[1];
  3496. originalLink = `magnet:?xt=urn:btih:${hash}`;
  3497. }
  3498. break;
  3499. case 'cloudtube':
  3500. case 'invidious':
  3501. case 'piped':
  3502. case 'pipedmaterial':
  3503. case 'poketube':
  3504. let pageId;
  3505. if (pathname.includes('/embed/')) {
  3506. pageId = pathname.split('/')[2];
  3507. } else {
  3508. pageId = sourceURL.searchParams.get('v');
  3509. }
  3510. originalLink = `https://youtube.com/watch?v=${pageId}`;
  3511. break;
  3512. case 'destructables':
  3513. case 'indestructables':
  3514. originalLink = `https://instructables.com${pathname}`;
  3515. break;
  3516. case 'gothub':
  3517. originalLink = `https://github.com${pathname}`;
  3518. break;
  3519. case 'laboratory':
  3520. originalLink = `https://${pathname}`;
  3521. break;
  3522. case 'libmedium':
  3523. splitPathname = pathname.split('/');
  3524. //let handler = splitPathname[1].substring(1);
  3525. let handler = splitPathname[1];
  3526. originalPath = splitPathname[2];
  3527. originalLink = `https://${handler}.medium.com/${originalPath}`;
  3528. break;
  3529. case 'libremdb':
  3530. originalLink = `https://imdb.com${pathname}`;
  3531. break;
  3532. case 'librarian':
  3533. originalLink = `https://odysee.com${pathname}`;
  3534. break;
  3535. case 'nitter':
  3536. originalLink = `https://twitter.com${pathname}`;
  3537. break;
  3538. case 'neuters':
  3539. originalLink = `https://reuters.com${pathname}`;
  3540. break;
  3541. case 'proxitok':
  3542. originalLink = `https://tiktok.com${pathname}`;
  3543. break;
  3544. case 'quetre':
  3545. originalLink = `https://quora.com${pathname}`;
  3546. break;
  3547. case 'libreddit':
  3548. case 'redlib':
  3549. case 'teddit':
  3550. if (pathname.includes('/img/')) {
  3551. filename = pathname.split('/')[2];
  3552. originalLink = `https://preview.redd.it/${filename}`;
  3553. } else
  3554. if (pathname.includes('/pics/')) {
  3555. filename = pathname.split('/')[2].replace('w:null_', '');
  3556. originalLink = `https://preview.redd.it/${filename}`;
  3557. } else {
  3558. originalLink = `https://reddit.com${pathname}`;
  3559. }
  3560. break;
  3561. case 'metastemwiki':
  3562. splitHash = sourceURL.hash.split('/')
  3563. lang = splitHash[3];
  3564. pathname = splitHash[2];
  3565. originalLink = `https://${lang}.wikipedia.org/wiki/${pathname}`;
  3566. break;
  3567. case 'imgin':
  3568. case 'rimgo':
  3569. originalLink = `https://imgur.com${pathname}`;
  3570. break;
  3571. case 'scribe':
  3572. originalLink = `https://medium.medium.com${pathname}`;
  3573. break;
  3574. case 'tent':
  3575. let artist = sourceURL.searchParams.get('artist');
  3576. let name = sourceURL.searchParams.get('name');
  3577. let type = sourceURL.searchParams.get('type');
  3578. if (type) {
  3579. originalLink = `https://${artist}.bandcamp.com/${type}/${name}`;
  3580. } else {
  3581. originalLink = `https://${artist}.bandcamp.com/`;
  3582. }
  3583. break;
  3584. case 'wikiless':
  3585. lang = sourceURL.searchParams.get('lang');
  3586. if (!lang) {
  3587. lang = document.querySelector('html').lang;
  3588. }
  3589. originalLink = `https://${lang}.wikipedia.org${pathname}`;
  3590. break;
  3591. case 'wikiwand':
  3592. splitPathname = pathname.split('/')
  3593. lang = splitPathname[1];
  3594. pathname = splitPathname[2];
  3595. originalLink = `https://${lang}.wikipedia.org/wiki/${pathname}`;
  3596. break;
  3597. default:
  3598. originalLink = ``;
  3599. }
  3600. return originalLink;
  3601. }
  3602.  
  3603. function infoBar(instanceSelect) {
  3604. let originalLink = getOriginalLink(instanceSelect);
  3605. let namespace = 'i2p-schimon-proxy-bar';
  3606. let bar = document.createElement(namespace);
  3607. document.body.prepend(bar);
  3608. bar.id = namespace;
  3609. instanceSelectCapitalized = instanceSelect[0].toUpperCase() + instanceSelect.substring(1);
  3610. //bar.textContent = `🥸 ${instanceSelectCapitalized} Proxy`;
  3611. bar.textContent = `${instanceSelectCapitalized} `;
  3612. //bar.title = 'Click to switch to another instance';
  3613. bar.style.all = 'unset';
  3614. bar.style.direction = 'ltr';
  3615. bar.style.backgroundColor = '#f1f1f1';
  3616. bar.style.color = '#000';
  3617. bar.style.borderTop = 'ridge';
  3618. bar.style.fontFamily = 'system-ui';
  3619. //bar.style.fontSize = 'larger';
  3620. bar.style.fontWeight = 'bold';
  3621. bar.style.right = 0;
  3622. bar.style.left = 0;
  3623. bar.style.bottom = 0;
  3624. bar.style.zIndex = 10000000000;
  3625. //bar.style.padding = '6px';
  3626. bar.style.position = 'fixed';
  3627. bar.style.textAlign = 'center';
  3628. bar.style.userSelect = 'none';
  3629. bar.style.opacity = 0.5;
  3630. //bar.onmouseleave = () => { // onmouseout
  3631. // bar.style.opacity = 0.8;
  3632. //};
  3633. bar.onmouseover = () => { // mouseenter
  3634. bar.style.opacity = 'unset';
  3635. };
  3636. // TODO Hide when screen is too narrow to hold all elements in one line
  3637. let text = document.createElement('input');
  3638. text.value = originalLink;
  3639. text.style.all = 'unset';
  3640. text.style.margin = '3px';
  3641. text.style.minWidth = '30%';
  3642. bar.append(text);
  3643. let buttonReturn = document.createElement('button');
  3644. buttonReturn.textContent = 'Return';
  3645. buttonReturn.title = 'Warning of surveillance! (click twice)';
  3646. buttonReturn.style.all = 'unset';
  3647. buttonReturn.style.margin = '3px';
  3648. buttonReturn.style.width = '10%';
  3649. buttonReturn.ondblclick = async () => {location.href = originalLink;};
  3650. bar.append(buttonReturn);
  3651. let select = document.createElement('select');
  3652. select.style.all = 'unset';
  3653. select.style.textAlign = 'left';
  3654. select.style.margin = '3px';
  3655. select.style.maxWidth = '30%';
  3656. select.oninput = async () => {replaceOrigin(select.value);};
  3657. bar.append(select);
  3658. for (i in proxy[instanceSelect]) {
  3659. for (j of proxy[instanceSelect][i]) {
  3660. let option = document.createElement('option');
  3661. option.textContent = j;
  3662. option.value = j;
  3663. select.append(option);
  3664. }
  3665. }
  3666. let buttonSwitch = document.createElement('button');
  3667. buttonSwitch.textContent = 'Random';
  3668. buttonSwitch.title = 'Switch instance randomly';
  3669. buttonSwitch.style.all = 'unset';
  3670. buttonSwitch.style.margin = '3px';
  3671. buttonSwitch.style.width = '10%';
  3672. buttonSwitch.onclick = async () => {await xhrInstanceSwitcher(instanceSelect);};
  3673. bar.append(buttonSwitch);
  3674. let buttonClose = document.createElement('button');
  3675. buttonClose.textContent = 'X';
  3676. buttonClose.style.all = 'unset';
  3677. buttonClose.style.margin = '3px';
  3678. buttonClose.style.width = '4%';
  3679. buttonClose.onclick = async () => {bar.remove();};
  3680. bar.append(buttonClose);
  3681. //let span = document.createElement('span');
  3682. //span.textContent = 'Proxy Redirect';
  3683. ////span.style.fontWeight = 'normal';
  3684. ////span.style.fontStyle = 'italic';
  3685. //span.style.margin = '3px';
  3686. //bar.append(span);
  3687. }
  3688.  
  3689. function replaceOrigin(newUrl) {
  3690. let url = new URL(location.href);
  3691. let pathname = url.pathname + url.search;
  3692. location.href = newUrl + pathname;
  3693. //url.origin = newUrl;
  3694. //location.href = url
  3695. }
  3696.  
  3697. async function pickURL(instanceName) {
  3698. // instance select
  3699. let urlArray, telecomSystem;
  3700. if (instanceName && await GM.getValue(instanceName, true)) {
  3701. for (let key of ['dhttp', 'i2p', 'loki', 'tor', 'veilid', 'yggdrasil']) {
  3702. if (await GM.getValue(key, false) &&
  3703. proxy[instanceName][key].length) {
  3704. urlArray = proxy[instanceName][key];
  3705. telecomSystem = key;
  3706. break;
  3707. }
  3708. }
  3709. if (!urlArray) {
  3710. urlArray = proxy[instanceName].clearnet;
  3711. telecomSystem = 'clearnet';
  3712. }
  3713. let urlSelect = urlArray[Math.floor(Math.random()*urlArray.length)];
  3714. return {name : instanceName, url : urlSelect, type : telecomSystem};
  3715. }
  3716. }
  3717.  
  3718. async function xhrInstanceSwitcher(instanceSelect) {
  3719. let url = location.href;
  3720. let result = await pickURL(instanceSelect);
  3721. if (!result) {return;}
  3722. let instanceName = result.name;
  3723. let instanceType = result.type;
  3724. let instanceUrl = result.url;
  3725. if (!url) {return;}
  3726. let newPath = location.pathname + location.search;
  3727. let newUrl = new URL(instanceUrl + newPath);
  3728. let counter = 0;
  3729.  
  3730. console.log(`
  3731. Setting Proxy to ${instanceName}
  3732. URL: ${newUrl}
  3733. `);
  3734.  
  3735. console.log(`
  3736. URL: ${url}
  3737. Selected: ${instanceUrl}
  3738. Pathname: ${newPath}
  3739. `);
  3740.  
  3741. try {
  3742. gmXmlhttpRequest({
  3743. method: 'GET',
  3744. url: instanceUrl,
  3745. synchronous: true,
  3746. onprogress: pageLoader(newUrl),
  3747. onload: function(response) {
  3748. if (response.finalUrl.startsWith(instanceUrl) && response.status == 200) {
  3749. newUrl = new URL(instanceUrl + newPath);
  3750. location.href = newUrl;
  3751. } else {
  3752. instanceUrl = instanceUrl.slice(instanceUrl.lastIndexOf('/')+1);
  3753. instanceUrl = instanceUrl.replace(/\./g,'-');
  3754. console.warn('Instance URL ' + instanceUrl + ' might be out of service. URL has changed. Please report this to the developer.');
  3755. if (maxAttempts(instanceName, instanceType, counter)) {
  3756. noRespond(url);
  3757. return;
  3758. }
  3759. maxAttempts(instanceName, instanceType, counter);
  3760. xhr();
  3761. }
  3762. },
  3763. onerror: function(response) {
  3764. instanceUrl = instanceUrl.slice(instanceUrl.lastIndexOf('/')+1);
  3765. instanceUrl = instanceUrl.replace(/\./g,'-');
  3766. console.warn('Instance URL ' + instanceUrl + ' might be offline. Status error: ' + response.status + '. Please report this to the developer.');
  3767. if (maxAttempts(instanceName, instanceType, counter)) {
  3768. noRespond(url);
  3769. return;
  3770. }
  3771. maxAttempts(instanceName, instanceType, counter);
  3772. xhr();
  3773. }
  3774. });
  3775. } catch (err) {
  3776. console.warn(err);
  3777. console.info('API GM.xmlHttpRequest does not seem to be available. Defaulting to Farside.link. Contribute your help in C++ to improve Greasemonkey for Falkon https://bugs.kde.org/show_bug.cgi?id=466533');
  3778. //pickURL();
  3779. instanceUrl = farSide(instanceName, instanceUrl);
  3780. //if ((proxy[instanceName].clearnet).filter(str => str.includes('farside.link')).length) {
  3781. // instanceUrl = (proxy[instanceName].clearnet).filter(str => str.includes('farside.link'))[0];
  3782. //}
  3783. location.href = new URL(instanceUrl + newPath);
  3784. }
  3785. }