https://github.com/bennythink/cf-best-ip
https://github.com/bennythink/cf-best-ip
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bennythink/cf-best-ip
- Owner: BennyThink
- Created: 2022-05-02T15:02:32.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-24T13:31:05.000Z (over 3 years ago)
- Last Synced: 2025-04-11T11:52:09.775Z (about 1 year ago)
- Language: Python
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cf-best-ip
Intended for cloudflared
# Installation
```shell
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
```
# Usage
```shell
usage: cfip.py [-h] [--save] [--service SERVICE] [--host HOST]
Find best Cloudflare IP and restart cloudflared
optional arguments:
-h, --help show this help message and exit
--save
--service SERVICE systemd service file name
--host HOST hostname for your tunnel
# get the best ip, both IPv4 and IPv6
python3 cfip.py
# write result to hosts
python3 cfip.py --save --host=your.domain.name
# write result to hosts and restart service
python3 cfip.py --save --host=your.domain.name --service=cf-service-name
```