Eric Guo's blog.cloud-mes.com

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

Expose Local Server to the Internet Without Ngrok

Permalink

Option 1

config/environments/development.rb
Rails.application.configure do
config.hosts << ".example.com"
end
config/puma.rb
ssl_bind "0.0.0.0""8443"{
# Run "certbot certificates" to get these
key "server.key".
cert"server.crt"
}
expose SSH port:
ssh -R 8443:localhost:8443 -N user@example.com

Option 2

ssh -C2qTnN -R 3003:localhost:3003 user@ssss.com
# Then, configure an Nginx proxy with a 3003 domain name for external access

Option 3

Open cursor, goto port tab to create one.

If meet error goto '/Applications/Cursor.app/Contents/Resources/app/bin' and rename cursor-tunnel to code-tunnel.

Comments