<img width="99.9%" src="https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/Logo.jpg"/>
<p align="center">
<a href="https://github.com/mishakorzik/mtunn"><img title="Version" src="https://img.shields.io/badge/Build-stable-cornflowerblue?style=for-the-badge&logo="></a>
<a href="https://github.com/mishakorzik/mtunn/blob/main/LICENSE"><img title="License" src="https://img.shields.io/badge/Apache-License 2.0-blue?style=for-the-badge&logo=apache"></a>
<a href="https://github.com/mishakorzik"><img title="Made in Ukraine" src="https://img.shields.io/badge/Made in-Ukraine-steelblue?style=for-the-badge&logo="></a>
<a href="https://github.com/mishakorzik"><img title="Copyring" src="https://img.shields.io/badge/Copyring-2024-skyblue?style=for-the-badge&logo=github"></a>
<a href="https://github.com/mishakorzik"><img title="Author" src="https://img.shields.io/badge/Author-mishakorzik-lightblue?style=for-the-badge&logo=github"></a>
</p>
<p align="center">
• <a href="https://github.com/mishakorzik/mtunn/blob/main/LICENSE">License</a>
• <a href="https://github.com/mishakorzik/mtunn/blob/main/mtunn.py">Source code</a>
• <a href="https://www.buymeacoffee.com/misakorzik">Donate</a>
• <a href="https://github.com/mishakorzik/mtunn/issues">Issues</a> •
</p>
> with «make tunnel» you can easily open http and tcp ports to the internet.
## Installation
Install the package from the `PyPi`:
```
pip install mtunn
```
Install manually from the `GitHub`:
```
pip install requests>=2.25.0
pip install PyYAML>=6.0.1
pip install ipaddress>=1.0.21
curl -o mtunn.py https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/mtunn.py
```
Want to learn more about the tunnel update?
Then check out the details **[here](https://github.com/mishakorzik/mtunn/blob/main/FEATURES.md)**
## Config example's
In order to start the tunnel, you need to log in to your account and create a configuration file.
```yaml
proto: tcp # protocol type (http/tcp)
target: 127.0.0.1:25565 # target host
tunnel: 10000 # port that will be opened
domain: none # domain to your tunnel
console: yes # for tunnel control (yes/no)
firewall:
rate: 2 # anti ddos rate (0-3)
vpn: yes # allow connection from vpn (yes/no)
tor: yes # allow connectiom from tor (yes/no)
network:
compression: no # traffic compression (yes/no)
m.threading: yes # multi threading (yes/no)
bandwidth: nolimit # limit bandwidth (ex. 20 mbits, 5 mbytes)
buffer: 32 kbytes # socket buffer size (1-96 kbytes)
ping:
method: icmp # ping method (icmp/tcp)
```
<details id="missing-code-coverage">
<summary>frequently asked questions</summary>
**1) What to do if I don't have a domain?**
- No need to worry, you can run tunnel without a domain just by specifying “none” in the “domain” field.
**2) if I have a domain, how do i connect it?**
- Using a domain is quite simple, you just need to specify your domain in the "domain" field and specify the A and AAAA record in the ip address of the tunnel.
- Please note that if the tunnel does not have IPv6, you do not need to specify an AAAA record for the tunnel's IP address.
**3) What ping method is the best?**
- Both options are best, we added the tcp method so that you can know the delay point without the ping command. If you are not sure about choosing icmp or tcp, you can simply not specify, the tunnel will choose automatically.
**4) Do I need to enable multi threading?**
- Enabling multithreading in tunnels allows for the simultaneous processing of multiple connections, enhancing performance and reducing latency. This ensures stable data transmission and reliable tunnel operation even under high load. We recommend to enable it.
</details>
If you have the correct configuration, you will be able to start the tunnel and everything will work.
## Tunnel commands
Instead of the name of the example.yml file, you can write your configuration name, but it must have the extension “.yml”.
```python
# show tunnel current version
python3 -m mtunn --version
# register or login to account
python3 -m mtunn --account
# use console to control tunnel
python3 -m mtunn --console
# open a port to internet
python3 -m mtunn --config example.yml
```
When you register you can run tunnels but only on ports in the range from 10000 to 11000. You can change it in your quota settings.
## Api example's
**Scan all active tunnels on localhost**
```python
>>> import mtunn
>>> mtunn.api.scan()
[{'remote': 'he1zen-de1.hopto.org:10000', 'local': '127.0.0.1:25565', 'console': 7010}]
>>>
```
**Execute commands on active tunnel**
```python
>>> import mtunn
>>> mtunn.api.execute(7010, "latency")
'{"address": "185.14.92.125", "method": "icmp", "time": "27.1ms"}'
>>>
```
* All commands that are in the console are also in the API and they are the same.
* To execute the command you only need to know the port from the console. you can find it by scanning all consoles.
* Also, the console is only available on the local network (127.0.0.1), you won't be able to launch it remotely.
## Screenshots
Here are examples of how to run and how the tunnel will work.
<img width="48.9%" src="https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_2.jpg"/> <img width="49.9%" src="https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_3.jpg"/>
<img width="47.5%" src="https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_1.jpg"/> <img width="51.4%" src="https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_4.jpg"/>
In order to open ports through the tunnel you need to create a configuration file.
## Other
[![Github](https://img.shields.io/badge/TELEGRAM-MishaKorzhik-orange?style=for-the-badge&logo=telegram)](https://t.me/ubp2q)
[![Github](https://img.shields.io/badge/Discord-He1Zen-blue?style=for-the-badge&logo=discord)](https://discord.gg/xwpMuMYW57)
If you find a bug or have any questions about this project, write to us on discord.
Raw data
{
"_id": null,
"home_page": "https://github.com/mishakorzik/mtunn",
"name": "mtunn",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "linux, windows, make, mtunn, tcp, http, open, port, easy, tunnel, alpha, beta, stable, pip, pypi, ping, firewall, domain, vpn, tor, console, control, ipv4, ipv6",
"author": "MishaKorzhik_He1Zen",
"author_email": "developer.mishakorzhik@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9a/dc/aae6a74ef7df39a16f9ccafc9b6de5352d599c4fd9dfb6e5b9840992e6a3/mtunn-1.1.8.tar.gz",
"platform": null,
"description": "<img width=\"99.9%\" src=\"https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/Logo.jpg\"/>\n\n<p align=\"center\">\n<a href=\"https://github.com/mishakorzik/mtunn\"><img title=\"Version\" src=\"https://img.shields.io/badge/Build-stable-cornflowerblue?style=for-the-badge&logo=\"></a>\n<a href=\"https://github.com/mishakorzik/mtunn/blob/main/LICENSE\"><img title=\"License\" src=\"https://img.shields.io/badge/Apache-License 2.0-blue?style=for-the-badge&logo=apache\"></a>\n<a href=\"https://github.com/mishakorzik\"><img title=\"Made in Ukraine\" src=\"https://img.shields.io/badge/Made in-Ukraine-steelblue?style=for-the-badge&logo=\"></a>\n<a href=\"https://github.com/mishakorzik\"><img title=\"Copyring\" src=\"https://img.shields.io/badge/Copyring-2024-skyblue?style=for-the-badge&logo=github\"></a>\n<a href=\"https://github.com/mishakorzik\"><img title=\"Author\" src=\"https://img.shields.io/badge/Author-mishakorzik-lightblue?style=for-the-badge&logo=github\"></a>\n</p>\n\n<p align=\"center\">\n\u2022 <a href=\"https://github.com/mishakorzik/mtunn/blob/main/LICENSE\">License</a>\n\u2022 <a href=\"https://github.com/mishakorzik/mtunn/blob/main/mtunn.py\">Source code</a>\n\u2022 <a href=\"https://www.buymeacoffee.com/misakorzik\">Donate</a>\n\u2022 <a href=\"https://github.com/mishakorzik/mtunn/issues\">Issues</a> \u2022\n</p>\n\n> with \u00abmake tunnel\u00bb you can easily open http and tcp ports to the internet.\n\n## Installation\n\nInstall the package from the `PyPi`:\n```\npip install mtunn\n```\n\nInstall manually from the `GitHub`:\n```\npip install requests>=2.25.0\npip install PyYAML>=6.0.1\npip install ipaddress>=1.0.21\ncurl -o mtunn.py https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/mtunn.py\n```\n\nWant to learn more about the tunnel update?\nThen check out the details **[here](https://github.com/mishakorzik/mtunn/blob/main/FEATURES.md)**\n\n## Config example's\n\nIn order to start the tunnel, you need to log in to your account and create a configuration file.\n\n```yaml\nproto: tcp # protocol type (http/tcp)\ntarget: 127.0.0.1:25565 # target host\ntunnel: 10000 # port that will be opened\ndomain: none # domain to your tunnel\nconsole: yes # for tunnel control (yes/no)\nfirewall:\n rate: 2 # anti ddos rate (0-3)\n vpn: yes # allow connection from vpn (yes/no)\n tor: yes # allow connectiom from tor (yes/no)\nnetwork:\n compression: no # traffic compression (yes/no)\n m.threading: yes # multi threading (yes/no)\n bandwidth: nolimit # limit bandwidth (ex. 20 mbits, 5 mbytes)\n buffer: 32 kbytes # socket buffer size (1-96 kbytes)\nping:\n method: icmp # ping method (icmp/tcp)\n```\n\n<details id=\"missing-code-coverage\">\n <summary>frequently asked questions</summary>\n\n**1) What to do if I don't have a domain?**\n- No need to worry, you can run tunnel without a domain just by specifying \u201cnone\u201d in the \u201cdomain\u201d field.\n\n**2) if I have a domain, how do i connect it?**\n- Using a domain is quite simple, you just need to specify your domain in the \"domain\" field and specify the A and AAAA record in the ip address of the tunnel.\n\n- Please note that if the tunnel does not have IPv6, you do not need to specify an AAAA record for the tunnel's IP address.\n\n**3) What ping method is the best?**\n- Both options are best, we added the tcp method so that you can know the delay point without the ping command. If you are not sure about choosing icmp or tcp, you can simply not specify, the tunnel will choose automatically.\n\n**4) Do I need to enable multi threading?**\n- Enabling multithreading in tunnels allows for the simultaneous processing of multiple connections, enhancing performance and reducing latency. This ensures stable data transmission and reliable tunnel operation even under high load. We recommend to enable it.\n</details>\n\nIf you have the correct configuration, you will be able to start the tunnel and everything will work.\n\n## Tunnel commands\n\nInstead of the name of the example.yml file, you can write your configuration name, but it must have the extension \u201c.yml\u201d.\n\n```python\n# show tunnel current version\npython3 -m mtunn --version\n\n# register or login to account\npython3 -m mtunn --account\n\n# use console to control tunnel\npython3 -m mtunn --console\n\n# open a port to internet\npython3 -m mtunn --config example.yml\n```\n\nWhen you register you can run tunnels but only on ports in the range from 10000 to 11000. You can change it in your quota settings.\n\n## Api example's\n\n**Scan all active tunnels on localhost**\n```python\n>>> import mtunn\n>>> mtunn.api.scan()\n[{'remote': 'he1zen-de1.hopto.org:10000', 'local': '127.0.0.1:25565', 'console': 7010}]\n>>> \n```\n\n**Execute commands on active tunnel**\n```python\n>>> import mtunn\n>>> mtunn.api.execute(7010, \"latency\")\n'{\"address\": \"185.14.92.125\", \"method\": \"icmp\", \"time\": \"27.1ms\"}'\n>>> \n```\n\n* All commands that are in the console are also in the API and they are the same.\n\n* To execute the command you only need to know the port from the console. you can find it by scanning all consoles.\n\n* Also, the console is only available on the local network (127.0.0.1), you won't be able to launch it remotely.\n\n## Screenshots\n\nHere are examples of how to run and how the tunnel will work.\n\n<img width=\"48.9%\" src=\"https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_2.jpg\"/> <img width=\"49.9%\" src=\"https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_3.jpg\"/>\n<img width=\"47.5%\" src=\"https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_1.jpg\"/> <img width=\"51.4%\" src=\"https://raw.githubusercontent.com/mishakorzik/mtunn/refs/heads/main/IMG_20241116_4.jpg\"/>\n\nIn order to open ports through the tunnel you need to create a configuration file.\n\n## Other\n\n[![Github](https://img.shields.io/badge/TELEGRAM-MishaKorzhik-orange?style=for-the-badge&logo=telegram)](https://t.me/ubp2q)\n[![Github](https://img.shields.io/badge/Discord-He1Zen-blue?style=for-the-badge&logo=discord)](https://discord.gg/xwpMuMYW57)\n\nIf you find a bug or have any questions about this project, write to us on discord.\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Easy open tcp, http ports from localhost to internet.",
"version": "1.1.8",
"project_urls": {
"Bug Tracker": "https://github.com/mishakorzik/mtunn/issues",
"Donate": "https://www.buymeacoffee.com/misakorzik",
"Homepage": "https://github.com/mishakorzik/mtunn"
},
"split_keywords": [
"linux",
" windows",
" make",
" mtunn",
" tcp",
" http",
" open",
" port",
" easy",
" tunnel",
" alpha",
" beta",
" stable",
" pip",
" pypi",
" ping",
" firewall",
" domain",
" vpn",
" tor",
" console",
" control",
" ipv4",
" ipv6"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9adcaae6a74ef7df39a16f9ccafc9b6de5352d599c4fd9dfb6e5b9840992e6a3",
"md5": "0d27e00cd627ee3871f28c94179fff67",
"sha256": "4563dfd4137ed069a02942c2661e534d6c7751fa5b2fb3926ccc7f684025c881"
},
"downloads": -1,
"filename": "mtunn-1.1.8.tar.gz",
"has_sig": false,
"md5_digest": "0d27e00cd627ee3871f28c94179fff67",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 25662,
"upload_time": "2024-12-03T19:50:13",
"upload_time_iso_8601": "2024-12-03T19:50:13.119088Z",
"url": "https://files.pythonhosted.org/packages/9a/dc/aae6a74ef7df39a16f9ccafc9b6de5352d599c4fd9dfb6e5b9840992e6a3/mtunn-1.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 19:50:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mishakorzik",
"github_project": "mtunn",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mtunn"
}