Skip to content

superdecrypt-dev/custom-geosite-xray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Custom Geosite Builder untuk Xray-Core

Build otomatis custom.dat dari berbagai sumber blocklist populer untuk digunakan di xray-core.

Hasil

File output Kategori Penggunaan di xray
custom.dat adblock "custom:adblock"

Sumber Blocklist

Sumber Format Deskripsi
StevenBlack base hosts Ads + malware
StevenBlack fakenews hosts + Fake news
GoodbyeAds main hosts Mobile ads
GoodbyeAds YouTube hosts YouTube ads
GoodbyeAds Samsung hosts Samsung ads
EasyList hosts Web ads
EasyPrivacy hosts Tracker & analytics
AdGuard DNS hosts DNS-level ads
Peter Lowe's list hosts Ad servers
1Hosts Xtra hosts Aggressive adblock
OISD Big domainswild2 Comprehensive DNS blocklist
Phishing Army plain Phishing domains
URLhaus hosts Active malware hosts

Struktur Folder

geosite-builder/
├── builder.py          → Script utama
├── setup.sh            → Script setup & first run
├── data/               → Domain list (dibuat otomatis saat build)
├── output/             → Hasil build: custom.dat
├── logs/               → Log setiap build
├── .cache/             → Cache fetch (valid 6 jam)
└── domain-list-community/  → Go builder (di-clone otomatis)

Cara Install

1. Prasyarat

  • Python 3.8+
  • Go 1.18+
  • git

2. Setup pertama kali

wget -O setup.sh https://raw.githubusercontent.com/superdecrypt-dev/custom-geosite-xray/master/setup.sh
chmod +x setup.sh
./setup.sh

Script akan otomatis:

  • Cek dan bantu install Go jika belum ada
  • Membuat semua direktori yang dibutuhkan
  • Menjalankan build pertama (opsional)

3. Install ke xray (manual)

sudo cp output/custom.dat /usr/local/share/xray/custom.dat
sudo systemctl restart xray

Perintah Build

# Build normal
python3 builder.py

# Hanya fetch & hitung domain, tanpa buat file
python3 builder.py --dry-run

# Paksa fetch ulang semua sumber (abaikan cache)
python3 builder.py --clear-cache

# Tampilkan sample domain saat parsing
python3 builder.py --verbose

# Skip deduplication
python3 builder.py --no-dedup

Penggunaan di Config Xray

Tambahkan rule berikut di bagian routing.rules sebelum rule direct atau proxy:

{
  "type": "field",
  "domain": ["custom:adblock"],
  "outboundTag": "block"
}

Tambah Sumber Blocklist Sendiri

Edit bagian SOURCES di builder.py:

"nama-sumber": {
    "url": "https://url-blocklist.com/hosts.txt",
    "format": "hosts",      # hosts / plain / domainswild2
    "description": "Deskripsi singkat",
},

Format yang didukung:

Format Keterangan
hosts File /etc/hosts: 0.0.0.0 domain.com
plain Satu domain per baris
domainswild2 Format OISD: *.domain.com

Lalu build ulang:

python3 builder.py --clear-cache

Troubleshooting

Go tidak ditemukan:

export PATH=$PATH:/usr/local/go/bin
# Atau install dari https://golang.org/dl/

Fetch gagal (timeout/network error):

python3 builder.py --clear-cache

Ingin lihat domain apa saja yang diblokir:

python3 builder.py --dry-run --verbose 2>&1 | less

Verifikasi xray membaca custom.dat:

# Pastikan file ada
ls -lh /usr/local/share/xray/custom.dat

# Cek log xray
sudo journalctl -u xray -n 50

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors