A Google Fonts proxier to set up your own Google Fonts Mirror.
A simple go program for setting up a Google Fonts Mirror. 简体中文
- Easy to deploy.
- Support for Cache.
- A practice for my go learning.
git clone https://github.com/MoeMion/GoMyFonts.git
cd ./GoMyFonts/
go build
#or
go run
You can build for go file or download Releases.
$ ./gomyfonts -help
Usage: gomyfonts [-h] [-p :port] [-l link] [-t title] [-c timeout of cache]
Github: https://github.com/MoeMion/GoMyFonts
Author: Mion
Options:
-c int
Expiration of cache,Unit:Minute. (default 10)
-l string
The url of your mirror site. (default "http://127.0.0.1/")
-p string
Bind TCP Port. (default ":2333")
-t string
The title of your mirror site. (default "GoMyFonts")
You can run MyGoFonts as a daemon. Here are some possible methods.
Copy binary file to /usr/local/bin
, run command as follow:
cp GoMyFonts /usr/local/bin
Create the systemd configuration file at /etc/systemd/system/gomyfonts.service
:
[Unit]
Description=System service for GoMyFonts.
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/GoMyFonts #you can specify parameters here.
[Install]
WantedBy=multi-user.target
Launch GoMyFonts when system startup with:
systemctl enable gomyfonts
Launch clashd immediately with:
systemctl start gomyfonts
Check the health and logs of Clash with:
systemctl status gomyfonts
journalctl -xe
Example of Supervisor configuration:
[program:gomyfonts]
command=/path/to/gomyfonts #you can specify parameters here.
directory=/path/to/
autorestart=true
startsecs=3
startretries=3
user=root
priority=999
numprocs=1
GoMyFonts currently does not support this feature, but you can use Nginx or Caddy to enable TLS/HTTPS connection.
Mion
Visit my blog : https://www.qwq.cc/
GoMyFonts is a practice for my go learning, if you find some bugs, please submit issue XD!