mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-13 23:03:09 +00:00
further modernizing
This commit is contained in:
11
README.md
11
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 <port> <secret> [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
|
||||
|
||||
@@ -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 <port> <secret> [ad_tag] [tls_domain]")
|
||||
|
||||
7
setup.py
7
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"
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user