Proxy Redirect

Redirect to privacy respecting proxy frontends

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址