update app/sources.py
Browse files- app/sources.py +111 -0
app/sources.py
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
from app.models import SourceConfig, SourceType
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class SourceRegistry:
|
| 6 |
+
"""
|
| 7 |
+
Registry of auto-updated GitHub proxy list sources.
|
| 8 |
+
These repositories auto-update daily/hourly with fresh proxies.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
SOURCES: List[SourceConfig] = [
|
| 12 |
+
SourceConfig(
|
| 13 |
+
url="https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt",
|
| 14 |
+
type=SourceType.GITHUB_RAW,
|
| 15 |
+
enabled=True,
|
| 16 |
+
),
|
| 17 |
+
SourceConfig(
|
| 18 |
+
url="https://raw.githubusercontent.com/proxifly/free-proxy-list/main/proxies/protocols/http/data.txt",
|
| 19 |
+
type=SourceType.GITHUB_RAW,
|
| 20 |
+
enabled=True,
|
| 21 |
+
),
|
| 22 |
+
SourceConfig(
|
| 23 |
+
url="https://raw.githubusercontent.com/roosterkid/openproxylist/main/HTTPS_RAW.txt",
|
| 24 |
+
type=SourceType.GITHUB_RAW,
|
| 25 |
+
enabled=True,
|
| 26 |
+
),
|
| 27 |
+
SourceConfig(
|
| 28 |
+
url="https://raw.githubusercontent.com/mmpx12/proxy-list/master/http.txt",
|
| 29 |
+
type=SourceType.GITHUB_RAW,
|
| 30 |
+
enabled=True,
|
| 31 |
+
),
|
| 32 |
+
SourceConfig(
|
| 33 |
+
url="https://raw.githubusercontent.com/mmpx12/proxy-list/master/https.txt",
|
| 34 |
+
type=SourceType.GITHUB_RAW,
|
| 35 |
+
enabled=True,
|
| 36 |
+
),
|
| 37 |
+
# V2Ray / VMess / VLESS / Trojan / Shadowsocks Sources
|
| 38 |
+
SourceConfig(
|
| 39 |
+
url="https://raw.githubusercontent.com/vorz1k/v2box/main/supreme_vpns_1.txt",
|
| 40 |
+
type=SourceType.SUBSCRIPTION_BASE64,
|
| 41 |
+
enabled=True,
|
| 42 |
+
),
|
| 43 |
+
SourceConfig(
|
| 44 |
+
url="https://raw.githubusercontent.com/Sage-77/V2ray-configs/main/vmess.txt",
|
| 45 |
+
type=SourceType.SUBSCRIPTION_BASE64,
|
| 46 |
+
enabled=True,
|
| 47 |
+
),
|
| 48 |
+
SourceConfig(
|
| 49 |
+
url="https://raw.githubusercontent.com/Sage-77/V2ray-configs/main/vless.txt",
|
| 50 |
+
type=SourceType.SUBSCRIPTION_BASE64,
|
| 51 |
+
enabled=True,
|
| 52 |
+
),
|
| 53 |
+
SourceConfig(
|
| 54 |
+
url="https://raw.githubusercontent.com/Sage-77/V2ray-configs/main/trojan.txt",
|
| 55 |
+
type=SourceType.SUBSCRIPTION_BASE64,
|
| 56 |
+
enabled=True,
|
| 57 |
+
),
|
| 58 |
+
SourceConfig(
|
| 59 |
+
url="https://raw.githubusercontent.com/Sage-77/V2ray-configs/main/ss.txt",
|
| 60 |
+
type=SourceType.SUBSCRIPTION_BASE64,
|
| 61 |
+
enabled=True,
|
| 62 |
+
),
|
| 63 |
+
SourceConfig(
|
| 64 |
+
url="https://raw.githubusercontent.com/Sage-77/V2ray-configs/main/config.txt",
|
| 65 |
+
type=SourceType.SUBSCRIPTION_BASE64,
|
| 66 |
+
enabled=True,
|
| 67 |
+
),
|
| 68 |
+
SourceConfig(
|
| 69 |
+
url="https://raw.githubusercontent.com/Zaeem20/FREE_PROXIES_LIST/master/http.txt",
|
| 70 |
+
type=SourceType.GITHUB_RAW,
|
| 71 |
+
enabled=True,
|
| 72 |
+
),
|
| 73 |
+
SourceConfig(
|
| 74 |
+
url="https://raw.githubusercontent.com/TopChina/proxy-list/main/http.txt",
|
| 75 |
+
type=SourceType.GITHUB_RAW,
|
| 76 |
+
enabled=True,
|
| 77 |
+
),
|
| 78 |
+
SourceConfig(
|
| 79 |
+
url="https://raw.githubusercontent.com/officialputuid/KangProxy/KangProxy/http/http.txt",
|
| 80 |
+
type=SourceType.GITHUB_RAW,
|
| 81 |
+
enabled=True,
|
| 82 |
+
),
|
| 83 |
+
SourceConfig(
|
| 84 |
+
url="https://raw.githubusercontent.com/gfpcom/free-proxy-list/main/http.txt",
|
| 85 |
+
type=SourceType.GITHUB_RAW,
|
| 86 |
+
enabled=True,
|
| 87 |
+
),
|
| 88 |
+
SourceConfig(
|
| 89 |
+
url="https://raw.githubusercontent.com/monosans/proxy-list/main/proxies/http.txt",
|
| 90 |
+
type=SourceType.GITHUB_RAW,
|
| 91 |
+
enabled=True,
|
| 92 |
+
),
|
| 93 |
+
SourceConfig(
|
| 94 |
+
url="https://raw.githubusercontent.com/monosans/proxy-list/main/proxies_anonymous/http.txt",
|
| 95 |
+
type=SourceType.GITHUB_RAW,
|
| 96 |
+
enabled=True,
|
| 97 |
+
),
|
| 98 |
+
SourceConfig(
|
| 99 |
+
url="https://raw.githubusercontent.com/zloi-user/hideip.me/main/http.txt",
|
| 100 |
+
type=SourceType.GITHUB_RAW,
|
| 101 |
+
enabled=True,
|
| 102 |
+
),
|
| 103 |
+
]
|
| 104 |
+
|
| 105 |
+
@classmethod
|
| 106 |
+
def get_enabled_sources(cls) -> List[SourceConfig]:
|
| 107 |
+
return [source for source in cls.SOURCES if source.enabled]
|
| 108 |
+
|
| 109 |
+
@classmethod
|
| 110 |
+
def get_all_sources(cls) -> List[SourceConfig]:
|
| 111 |
+
return cls.SOURCES
|