Giter VIP home page Giter VIP logo

python-ngrok's People

Contributors

hauntek avatar jerrickrowe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-ngrok's Issues

希望加上一个结束的接口

首先感谢作者的贡献。

我的程序集成了这个功能,将其放到一个线程中,停不下来。

如果放到一个子进程中,terminate 之后感觉也没有停下来,因为再开已子进程的话,会提示服务器端口已经在使用。

最后,希望线程里可以加上一个结束的信号。

求助

我是小白请问能做到这个吗
F89B258D-C892-417A-AD83-9117E73BABAE

ssl 证书问题

使用python-ngrok转发本地3389端口,使用远程桌面时, 提示无效的证书。是ngrok服务器问题,还是python-ngrok的问题呢?

TCP转发bug

你好,用python-ngrok开tcp转发国外的ss,转发后能打开youtube,但是无法播放,不知道是不是bug。其他的网站没有问题,用的是python版的ss。

我在老毛子上跑有问题

[RT-AC1200HP /etc/storage/ngr]# ./test
[2018/10/02 16:14:29] [INFO] [client] python-ngrok v1.5
[2018/10/02 16:14:29] [DEBUG] [Conn:3] New connection to: [我的服务器ip地址]:4443
Traceback (most recent call last)
File "/etc/storage/ngr/python-ngrok-master/python-ngrok.py", line 344, in
thread.start()
File "/opt/lib/python2.7/threading.py", line 736, in start
thread.error: can't start new thread

在ddwrt上也出现过,当时用 ulimit -s 512 就可以跑了,
但是hiboy的老毛子不知道为什么还是不行,
想问下从python这边看有没有什么解决方法呢?

树莓派上运行的几个问题

{ "server": { "host": "xxx.com", "port": 4443, "bufsize": 8192 }, "client": [ { "protocol": "tcp", "hostname": "", "subdomain": "", "rport": 50022, "lhost": "127.0.0.1", "lport": 22 }, { "protocol": "tcp", "hostname": "", "subdomain": "", "rport": 53066, "lhost": "127.0.0.1", "lport": 3066 }, { "protocol": "http", "hostname": "", "subdomain": "toco", "rport": 0, "lhost": "127.0.0.1", "lport": 80 } ] }
上面是树莓派的配置,在内网;服务器是一台阿里的云服务器。
之前用ngrok,运行正常,就是内存泄漏严重。
目前改用贵脚本以后,情况如下:
1、22端口正常,可以远程访问
2、3066端口,通过客户端访问53066,提示:
Lost connection to MYSQL server at ‘reading inital communication packet’, system error 0
3、http页面,访问toco.xxx.com正常,但是nginx的反向代理部分的域名失效,nginx的配置如下:
云服务器端
`
server {
listen 80;
server_name toco.xxx.com;

index index.html;

location / {
	proxy_set_header X-Real-IP $remote_addr; 
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
	proxy_set_header Host $http_host:50080; 
	proxy_set_header X-Nginx-Proxy true; 
	proxy_set_header Connection ""; 
	proxy_pass http://127.0.0.1:50080; 
}

}

server {
listen 80;
listen [::]:80;

root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;

location / {
	try_files $uri $uri/ /index.html;
}

}

树莓派:
server {
listen 80 default_server;
listen [::]:80 default_server;

root /home/pi/work/web;

index index.html index.htm index.nginx-debian.html;

server_name _;

location /v1/ {
	proxy_pass http://127.0.0.1:3088/v1/;
}

location /v2/ {
	proxy_pass http://127.0.0.1:5990/v2/;
}

location / {
	try_files $uri $uri/ /index.html;
}

}

`

我的问题如下:
1、上述问题是否与非pc架构有关,看代码里面有arch、os的配置,不过对python不熟悉,代码没看懂。
2、我的服务器端是自己编译的,绑定了域名,是否与此有关。
3、目前脚本是否支持nginx的反向代理?

非常感谢作者的无私奉献

对配置文件有些不理解

python python-ngrok.py ngrok.config
配置lport为8090,rport为8090,实际tomcat也使用8090。但是访问时只能通过 【域名:80】成功访问。是配置文件没有生效还是配置不正确?建议在配置文件增加注释,提升易用性。
感谢。

如果绑定其他端口(55035)时, hostname值中的端口号去掉

def getloacladdr(Tunnels, Url): protocol = Url[0:Url.find(':')] hostname = Url[Url.find('//') + 2:] if str(hostname).find(":")>-1: hostname=hostname[0:hostname.find(':')]

如果绑定其他端口时, hostname值中的端口号去掉【受影响的代码 if tunnelinfo.get('hostname') == hostname 】
eg:aaaa.bbb.cn:55035

我想在这个版本上增加websocket穿透

我想用websocket做一个功能,所以想在这个版本上增加websocket穿透,麻烦@hauntek 估测一下开发工作量,还有具体入手点。ngrokd/ngrok都想用你的python版本。网络编程了解不多,能编写非常入门的程序。

IPV6支持问题

当服务器为一个ipv6地址时,会一直 update dns
是不是因为找不到ipv4地址所以才一直这样的啊
或者说,这个项目是不支持ipv6服务器吗
原版的windows客户端是可以支持ipv6的。。。

是不是还有内存泄漏

昨天刚开机是消耗8M左右内存,跑了12小时变成 15M了。。。

用的是PyInstaller 编译成EXE运行的,运行时有日志不断输出

使用 python3和2都回出现这个错误

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "python-ngrok.py", line 283, in HKClient
    newsock = connectlocal(loacladdr['lhost'], loacladdr['lport'])
KeyError: 'lhost'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.