Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Build a Websocket Tunnel in Elixir
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hemslo
September 05, 2018
Programming
130
1
Share
Build a Websocket Tunnel in Elixir
Hemslo
September 05, 2018
More Decks by Hemslo
See All by Hemslo
Introduction to Elixir
hemslo
0
450
Other Decks in Programming
See All in Programming
20260514_its_the_context_window_stupid.pdf
heita
0
940
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
190
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
200
【ディップ|26年新卒研修資料】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
150
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
20k
要はバランスからの卒業 #yumemi_grow
kajitack
0
140
実用!Hono RPC2026
yodaka
2
310
From Formal Specification to Property Based Test
ohbarye
0
2.4k
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
270
AIを導入する前にやるべきこと
negima
2
350
AIと共に生きる技術選定 2026
sgash708
0
140
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
380
Featured
See All Featured
Fireside Chat
paigeccino
42
3.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
Are puppies a ranking factor?
jonoalderson
1
3.4k
Done Done
chrislema
186
16k
Practical Orchestrator
shlominoach
191
11k
Code Reviewing Like a Champion
maltzj
528
40k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
Odyssey Design
rkendrick25
PRO
2
610
The Spectacular Lies of Maps
axbom
PRO
1
740
How to Talk to Developers About Accessibility
jct
2
190
Statistics for Hackers
jakevdp
799
230k
Transcript
Build a Websocket Tunnel - Wang, Di @hemslo
Tunnel
Websocket
Hello World: Echo Server Task and gen_tcp
Glance SRC --- Client -websocket tunnel- Server --- Forwarder ---
DEST
Forwarder Connect to destination host:port When data received from source,
send to destination When data received from destination, send to source Code
Websocket Server Cowboy Phoenix.Endpoint.CowboyWebSocket Phoenix.Transports.WebSocket Code
Websocket Client websocket_client ranch Code
SOCKS Proxy SOCKS Dante ssh -D
TLS: WSS No Coding, don’t invent your own encryption algorithm,
use TLS. SRC --- Client -wss- Nginx -ws- Server --- Forwarder --- DEST
Future Error handle and connection close Use Cowboy 2 Documentation
Wider usage
Q&A