From 45eb81d58cbadd134a8eb0770577ec81e05ddf3d Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Mon, 26 Aug 2019 16:27:10 +0500 Subject: [PATCH] further modernizing --- README.md | 11 ++++------- mtprotoproxy.py | 2 +- setup.py | 7 ++++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b2fed90..8cf1e17 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,13 @@ Fast and simple to setup mtproto proxy. ## Starting Up ## -1. `git clone -b stable https://github.com/alexbers/mtprotoproxy.git; cd mtprotoproxy` -2. *(optional, recommended)* edit *config.py*, set **PORT**, **USERS** and **AD_TAG** -3. `docker-compose up --build -d` (or just `python3 mtprotoproxy.py` if you don't like docker) -4. *(optional, shows telegram link to set the proxy)* `docker-compose logs` +1. *(optional, recommended)* `pip install uvloop` +2. `pip install mtprotoproxy` +3. `mtprotoproxy [ad_tag] [tls_domain]`. Example: `mtprotoproxy 443 d14c0fb43d4bb5be3184037560fb146c 3c09c680b76ee91a4c25ad51f742267d google.com` ## Channel Advertising ## -To advertise a channel get a tag from **@MTProxybot** and write it to *config.py*. +To advertise a channel get a tag from **@MTProxybot**. ## Performance ## @@ -23,5 +22,3 @@ the VDS instance with 1 CPU core and 1024MB RAM. The proxy can be launched: - with a custom config: `python3 mtprotoproxy.py [configfile]` - several times, clients will be automaticaly balanced between instances -- using *PyPy* interprteter -- with runtime statistics exported for [Prometheus](https://prometheus.io/): using [prometheus](https://github.com/alexbers/mtprotoproxy/tree/prometheus) branch diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 29f420c..b22f061 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -86,7 +86,7 @@ mask_host_cached_ip = None config = {} -if len(sys.argv) < 3: +if len(sys.argv) < 2: random_secret = "".join(random.choice("0123456789abcdef") for i in range(32)) ad_tag = "3c09c680b76ee91a4c25ad51f742267d" print("Usage: mtprotoproxy [ad_tag] [tls_domain]") diff --git a/setup.py b/setup.py index 7a27e84..648005c 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open("README.md", "rt") as readme_fp: setuptools.setup( name="mtprotoproxy", - version="1.0.0", + version="1.0.6", description="Async MTProto Proxy", long_description=long_description, url="https://github.com/alexbers/mtprotoproxy", @@ -22,7 +22,7 @@ setuptools.setup( ], extras_require={ "uvloop": [ - "uvloop~=0.10.1" + "uvloop~=0.13.0" ] }, scripts=[ @@ -35,6 +35,7 @@ setuptools.setup( "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6" + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7" ] )