mtprotod

command
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

README

mtprotod

MTProto proxy daemon. It contains Telegram MTProto implementation in Go. Its clients can share one Telegram MTProto session, or you can make your own session scheduler.

Quick Start

You can test if the proxy running using proxy_test.go.

# start mtprotod at port 11011
docker run \
-p 11011: 11011 \
-v /your/mtproto/secrets/directory:/opt \
cjongseok/mtprotod start  \
--port 11011 \
--addr <Your_Telegram_server_address> \
--apiid <Your_Telegram_api_id> \
--apihash <Your_Telegram_api_hash> \
--phone <Your_Telegram_phone_number> \
--secrets /opt/<Your_MTProto_secrets_file_name>

# At mtproto/proxy, let's get dialogs through over the proxy
dep ensure
go test --run TestDialogs

Usage

Run as a container

mtprotod Docker image is at Docker hub, cjongseok/mtprotod.

docker run \
-p <Proxy_port>:<Proxy_port> \
-v /your/mtproto/secrets/directory:/opt \
cjongseok/mtprotod start  \
--addr <Your_Telegram_server_address> \
--apiid <Your_Telegram_api_id> \
--apihash <Your_Telegram_api_hash> \
--phone <Your_Telegram_phone_number> \
--port <Proxy_port> \
--secrets /opt/<Your_MTProto_secrets_file_name>
Build & Run

mtprotod is vendored in dep.

# In mtprotod directory
dep ensure
go run main.go start \
--addr <Your_Telegram_server_address> \
--apiid <Your_Telegram_api_id> \
--apihash <Your_Telegram_api_hash> \
--phone <Your_Telegram_phone_number> \
--port <Proxy_port> \
--secrets /opt/<Your_MTProto_secrets_file_name>

Clients

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL