Skip to content

Commit

Permalink
Fixed GeoIP file path issueˆ
Browse files Browse the repository at this point in the history
Signed-off-by: Sadam·Sadik <[email protected]>
  • Loading branch information
Haoke98 committed May 10, 2024
1 parent b4f8c1c commit 7484e0e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PFlowC/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def get_version():
return '2.1.1'
return '2.2.0'
5 changes: 4 additions & 1 deletion PFlowC/geo_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
import geoip2.database
from mitmproxy import http

import importlib.resources as pkg_resources
from PFlowC.proxy_helper import set_bypass_domains
from PFlowC.utils.net import is_domestic2

# GeoIP数据库文件路径
GEOIP_DB_PATH = '/Users/shadikesadamu/数据/geoip/Country.mmdb'

GEOIP_DB_PATH = str(pkg_resources.path('PFlowC.utils', 'Country.mmdb'))
geoip_db = geoip2.database.Reader(GEOIP_DB_PATH)

# 本地区域的国家代码,例如'CN'为中国
LOCAL_REGION_CODE = 'CN'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A net flow pilot in order to handle some proxy configuration automatically.
╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚══╝╚══╝ ╚═════╝

Command line interface for Proxy Flow Controller with basic auto configurations.
Version: 2.1.1 By: BlackHaoke<[email protected]>
Version: 2.2.0 By: BlackHaoke<[email protected]>
Usage: pflow-cli [OPTIONS] COMMAND [ARGS]...

Options:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Usage ::
╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚══╝╚══╝ ╚═════╝

Command line interface for Proxy Flow Controller with basic auto configurations.
Version: 2.1.1 By: BlackHaoke<[email protected]>
Version: 2.2.0 By: BlackHaoke<[email protected]>
Usage: pflow-cli [OPTIONS] COMMAND [ARGS]...

Options:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name='PFlowC',
version='2.1.1',
version='2.2.0',
url='https://github.com/Haoke98/FlowPilot',
author='Haoke98',
author_email='BlackHaoke<[email protected]>',
Expand Down

0 comments on commit 7484e0e

Please sign in to comment.