Proxy Redirect

Redirect to privacy respecting proxy frontends

当前为 2025-03-16 提交的版本,查看 最新版本

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