ProxyCat/ProxyCat-CN/config.py

17 lines
383 B
Python
Raw Normal View History

2024-10-23 16:44:15 +08:00
import configparser
DEFAULT_CONFIG = {
'port': 1080,
'mode': 'cycle',
'interval': 300,
'username': '',
'password': '',
2024-10-29 11:22:54 +08:00
'use_getip': False,
2024-10-23 16:44:15 +08:00
'proxy_file': 'ip.txt',
}
def load_config(config_file='config.ini'):
config = configparser.ConfigParser()
config.read(config_file, encoding='utf-8')
2024-10-29 11:22:54 +08:00
return {k: v for k, v in config['SETTINGS'].items()}