demotomohiro / remocolab

remocolab is a Python module to allow remote access to Google Colaboratory using SSH or TurboVNC.
MIT License
317 stars 230 forks source link

[Feature Request]What about setting up my own ngrok server? #16

Closed vbuterin2 closed 4 years ago

vbuterin2 commented 4 years ago

I have a linux server which has a public ip, can we modify the script a little bit to connect our own ngrok server somehow?

vbuterin2 commented 4 years ago

@demotomohiro I really think this feature is essential for anyone who is having connectivity issue to ngrok.com official servers or has their own enterprise firewall.

By the way, I think the official hosted ngrok.com cannot offer their customers over 10M internet speed, which is no ideal for people who use SFTP with SSH. Their VNC or RDP connection must suffers a lot while transferring files.

rayanfer32 commented 4 years ago

you should try openvpn

On Sat, 25 Apr, 2020, 3:10 PM fhforest, notifications@github.com wrote:

@demotomohiro https://github.com/demotomohiro

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/demotomohiro/remocolab/issues/16#issuecomment-619351651, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI3MT5TOCCZN3V27PYBMDRLROKVXTANCNFSM4MQVQMHA .

vbuterin2 commented 4 years ago

you should try openvpn On Sat, 25 Apr, 2020, 3:10 PM fhforest, @.***> wrote: @demotomohiro https://github.com/demotomohiro — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#16 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI3MT5TOCCZN3V27PYBMDRLROKVXTANCNFSM4MQVQMHA .

Great idea, I also want to try teredo. But we ignored the fact that we cannot create a new network adapter in google colab since we don't have CAP_NET_BIND permission. So OpenVPN won't work in Colab.

vbuterin2 commented 4 years ago

I think we might give this thing a try https://github.com/inconshreveable/ngrok/blob/master/docs/SELFHOSTING.md.

rayanfer32 commented 4 years ago

sounds like a good idea... i dont own any domains thou... can u plz try this... might work out pretty well

On Sat, 25 Apr, 2020, 4:03 PM fhforest, notifications@github.com wrote:

I think we might give this thing a try https://github.com/inconshreveable/ngrok/blob/master/docs/SELFHOSTING.md.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/demotomohiro/remocolab/issues/16#issuecomment-619357901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI3MT5QHGVZCYQNYHOTXRHDROK4A7ANCNFSM4MQVQMHA .

demotomohiro commented 4 years ago

I added custom_ngrok_server parameter in branch user-ngrok-server to specify your ngrok server address. Following code connects to ngrok server specified in custom_ngrok_server. Please change "example.com:4443" to your server address and port number.

!pip install git+https://github.com/demotomohiro/remocolab.git@user-ngrok-server
import remocolab
remocolab.setupSSHD(custom_ngrok_server = "example.com:4443")

In this branch, When ngrok server address is set to custom_ngrok_server, server_addr and trust_host_root_certs options are added to /root/.ngrok2/ngrok.yml according to following document. https://github.com/inconshreveable/ngrok/blob/master/docs/SELFHOSTING.md

But this feature is not tested because I don't have a server which has a public IP.