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
Hemslo
September 05, 2018
Programming
1
100
Build a Websocket Tunnel in Elixir
Hemslo
September 05, 2018
Tweet
Share
More Decks by Hemslo
See All by Hemslo
Introduction to Elixir
hemslo
0
400
Other Decks in Programming
See All in Programming
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
130
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
480
Anthropic Cookbook のおすすめレシピ
schroneko
7
870
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
2 週間で Twitter Bot を作ってみた
contour_gara
0
270
Ruby GitHub Packages
bkuhlmann
0
630
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
Rethinking UI building strategies @ SFI 2024
letelete
0
270
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4k
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
230
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
120
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
289
19k
BBQ
matthewcrist
80
8.8k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Atom: Resistance is Futile
akmur
259
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Done Done
chrislema
178
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
Rails Girls Zürich Keynote
gr2m
91
13k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
The Pragmatic Product Professional
lauravandoore
25
5.8k
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