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
@matchrules targetgofile.io,gofile.co,wwwvariants and common domain variants—edit the header@matchlines if you need broader or narrower scope.
https://gofile.io/d/xxxx → https://gf.1drv.eu.org/xxxhttps://gofile.co/file/d/QGjyK2/some/path?x=1#t → https://gf.1drv.eu.org/QGjyK2/some/path?x=1#thttps://gofile.io/?file=xxxx → https://gf.1drv.eu.org/xxxOpt-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.QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址