https://github.com/twsh0305/referer-restrict
基于YOURLS的插件,用于限制允许来自哪些域名的访问
https://github.com/twsh0305/referer-restrict
Last synced: 3 months ago
JSON representation
基于YOURLS的插件,用于限制允许来自哪些域名的访问
- Host: GitHub
- URL: https://github.com/twsh0305/referer-restrict
- Owner: twsh0305
- License: mit
- Created: 2025-10-07T15:01:01.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-07T15:50:25.000Z (9 months ago)
- Last Synced: 2025-10-07T17:27:53.233Z (9 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - Referer Restrict - Referer is used to restrict access from which domain names are allowed. (Plugins / R)
README
# YOURLS Plugin: referer-restrict [](https://github.com/YOURLS/awesome-yourls/)
A YOURLS-based plugin to restrict access from specific referrer domains.
[中文文档](https://github.com/twsh0305/referer-restrict/blob/main/README_CN.md)

## Installation Steps
YOURLS Installation Guide: [https://wxsnote.cn/6633.html](https://wxsnote.cn/6633.html)
1. Download the plugin from the releases page and extract it to the `/user/plugins/` directory.
2. Visit the plugin management page (`/admin/plugins.php`) and activate the plugin.
3. Start using it!
## Translation Support
1. The plugin supports custom language translation. Its `languages` directory contains the `referer-restrict-zh_CN.po` file - please download this file first.
2. Replace `zh_CN` in the downloaded filename with your target region's language code (e.g., `en_US`).
3. Download and use the [Poedit](https://poedit.net/) tool to open the modified `.po` file, then complete the translation for your target language.
4. After finishing the translation, save the file via Poedit - this will automatically generate a corresponding `.mo` file (same filename as the `.po` file, different extension).
5. Place both the translated `.po` file (e.g., `referer-restrict-en_US.po`) and the automatically generated `.mo` file into the plugin's `languages` directory (Note: Not YOURLS' own `languages` directory).
6. After completing the above steps, you can enjoy the plugin's custom language support! Feel free to submit your translation files to the plugin repository to contribute to the multilingual ecosystem.
## License
Free for any use - you can perform any operations on this plugin without restrictions.
Author's Blog: [Mr. Wang's Notes](https://wxsnote.cn)