您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirect gofile share pages (e.g. /d/QGjyK2) to gf.1drv.eu.org (maps /d/<id> -> /<id>). Shows a brief banner "redirected to gf.1drv.eu.org" before redirecting. Opt-out with ?noredirect=1. Preserves trailing path/query/hash and avoids loops.
Version: 1.2 Author: you License: MIT
GoFile Download Bypass pages (e.g. https://gofile.io/d/xxxxx
) to a preferred mirror host (https://gf.1drv.eu.org/<ID>
), preserving the file ID, trailing path segments, query string, and fragment/hash. The script displays a brief, unobtrusive banner (Redirected to gf.1drv.eu.org
) just before navigation so the user sees what happened. Includes safeguards to avoid loops and an opt-out query parameter for inspection.
/d/<id>
, /f/<id>
, /file/d/<id>
, and ?file=<id>
→ https://gf.1drv.eu.org/<id>
.?noredirect=1
(or &noredirect=1
) — skips the banner and redirect.sessionStorage
(avoids repeated redirects for the same ID during a session)./api/
, /static/
, /public/
, /cdn/
, etc.).GoFile bypass:
for troubleshooting.TARGET_HOST
and banner timing in the script header.The script
@match
rules targetgofile.io
,gofile.co
,www
variants and common domain variants—edit the header@match
lines if you need broader or narrower scope.
https://gofile.io/d/xxxx
→ https://gf.1drv.eu.org/xxx
https://gofile.co/file/d/QGjyK2/some/path?x=1#t
→ https://gf.1drv.eu.org/QGjyK2/some/path?x=1#t
https://gofile.io/?file=xxxx
→ https://gf.1drv.eu.org/xxx
Opt-out example:
https://gofile.io/d/QGjyK2?noredirect=1
— banner and redirect will be skipped for that visit.
Edit the top CONFIG
block in the script to change behavior:
TARGET_HOST
— destination host for redirects (default: gf.1drv.eu.org
).IGNORE_PREFIXES
— array of path prefixes to skip (API/static endpoints).OPT_OUT_PARAM
— query parameter name to skip redirects (default: noredirect
).BANNER_SHOW_MS
— how long the banner stays visible (milliseconds).BANNER_FADE_MS
— CSS fade duration for banner show/hide (milliseconds).ID_RE
and ID min/max lengths — regex and limits that determine what looks like a file ID.@match
entries and that the URL contains a recognized pattern. Append ?noredirect=1
to inspect the original page without redirection.sessionStorage
to mark redirected IDs. Close the tab to clear session markers or clear sessionStorage via developer tools to reset behavior.window.open()
or GM_openInTab
(if available) to open the mirror in a new tab — contact the author or edit the script to change that behavior.Open the browser console (F12) to view GoFile bypass:
debug messages for diagnosis.
sessionStorage
is used only to mark redirected IDs during the browsing session to prevent redirect loops.