はじめに
これまでcloudflaredを紹介してきましたが、remotemoeというOSSもあります。
これは自分で環境を整えることができるようです。
Goでビルドします。
また、簡単に試すことができるようです。
remotemoe はstable_diffusion_webui_colab などで利用されています。
remote.moeのサーバーを利用する場合には注意してください。本番環境などでは現状はセキュリティ的にはお勧めできません。
自身の環境に構築しましょう。
試してみる
簡単に試せるようです。remote.moeで簡単に利用できるようになっています。
80ポートにトンネルは張りたい時は下記のようなコマンドです。
ssh -R 80:localhost:80 remote.moe
キーを作成する必要があります。
# ssh -R 80:localhost:80 remote.moe
The authenticity of host 'remote.moe (159.69.126.209)' can't be established.
ED25519 key fingerprint is SHA256:kMxFW+LyuX7Drfx0Zhs4Leg4PC582mJXq/XyNMs3awQ.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'remote.moe' (ED25519) to the list of known hosts.
root
__
.----.-----.--------.-----.| |_.-----.--------.-----.-----.
| _| -__| | _ || _| -__| | _ | -__|
|__| |_____|__|__|__|_____||____|_____|__|__|__|_____|_____|
You somehow forgot to present a public key when trying to authenticate.
Please continue by creating one:
ssh-keygen
remotemoe accepts any key - see ya!
(root@remote.moe)
ssh-keygen を実行します。
再度接続します。
# ssh -R 80:localhost:80 remote.moe http (80) http://a6dyblqeh53ekkdmotylda4exigtgrjcwvi23g4abs6qilkzx7da.remote.moe/
あとはアクセスするだけです。
まとめ
remotemoe を紹介しました。自身の環境でngrokやcloudflaredのような環境を整えたい場合には利用できるかと思います。

