Skip to content

Commit

Permalink
Merge pull request #146 from vvbbnn00/feat-sub-loon
Browse files Browse the repository at this point in the history
feat: allow customizing config even in yaml format
  • Loading branch information
vvbbnn00 committed Mar 13, 2024
2 parents 52e9f07 + 7aa553c commit 8d2dc7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
from utils.geoip import GeoIP
from utils.node_name import NodeNameGenerator

CF_CONFIG = json.load(open("./config/cf-config.json", "r", encoding="utf8"))
CLASH = json.load(open("./config/clash.json", "r", encoding="utf8"))
CF_CONFIG = yaml.load(open("./config/cf-config.json", "r", encoding="utf8"), Loader=yaml.FullLoader)
CLASH = yaml.load(open("./config/clash.json", "r", encoding="utf8"), Loader=yaml.FullLoader)

SURGE = configparser.ConfigParser()
SURGE.read("./config/surge.conf", encoding="utf8")
SURGE_RULE = open("./config/surge-rule.txt", "r", encoding="utf8").read()
SURGE_SUB = open("./config/surge-sub.txt", "r", encoding="utf8").read()

SING_BOX = json.load(open("./config/sing-box.json", "r", encoding="utf8"))
SING_BOX = yaml.load(open("./config/sing-box.json", "r", encoding="utf8"), Loader=yaml.FullLoader)

GEOIP = GeoIP('./config/geolite/GeoLite2-Country.mmdb')

Expand Down

0 comments on commit 8d2dc7a

Please sign in to comment.