Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PROXY Protocol aware Proxy Server on Node.js
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
moznion
April 27, 2019
Technology
2.7k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PROXY Protocol aware Proxy Server on Node.js
This slides for Kyoto.js #16
moznion
April 27, 2019
Transcript
18 slides
PROXY Protocol Aware Proxy Server on Node.js Kyoto.js #16 @moznion
@moznion Software engineer
PROXY Protocol
Proxy PROTOCOL - Transport Layer (L4) ൛ͷX-Forwarder-For - Proxy͢ΔࡍʹoriginalͷΞυϨεΛҡ࣋ͯ͠ ѼઌϑΥϫʔυ͢ΔͨΊͷϓϩτίϧ
- HAProxy͕ఏএ (ۀքඪ४Έ͍ͨͳʁ) - http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt - AWSͷELBͰαϙʔτͯ͠Δ - V1ͱV2͕͋Δ (ޙड़)
PROXY Protocol V1
Proxy PROTOCOL V1 - ςΩετϓϩτίϧ - ϑΥʔϚοτ: PROXY <INET Protocol
Family> <Source Address> <Destination Address> <Source Port> <Destination Port>\r\n - Θ͔Γ͍͢Ͱ͢Ͷ
PROXY Protocol V2
Proxy PROTOCOL V2 - όΠφϦϓϩτίϧ - આ໌ུ (ͪΐͬͱ໘͍͘͞) - V1ͱͷػೳ໘Ͱͷେ͖ͳࠩUNIX
Domain SocketΛαϙʔτ͍ͯ͠Δ͔Ͳ͏͔
Example (V1)
Example (V1) PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n GET /
HTTP/1.1\r\n Host: 192.168.0.11\r\n \r\n
Example (V1) PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n GET /
HTTP/1.1\r\n Host: 192.168.0.11\r\n \r\n طଘͷ௨৴ͷΞλϚʹprepend͢Δ
Proxy PROTOCOL - طଘͷ௨৴ͷΞλϚʹprepend͢Δ - γϯϓϧʂ - => ૹ৴ݩૹ৴ઌʮPROXY ProtocolΛ͏ʯ
ͱ͍͏͜ͱΛࣄલʹ͓ͬͯ͘ඞཁ༗Γ - ͞ͳ͍ͱͿͬյΕΔ
Motivation
nodeͰΓ͍ͨΜʁ ʢੈͷதʹ৭ʑͳ͜ͱ͕͋Δʣ
proxy-protocol-js - ͱ͍͏Θ͚Ͱॻ͍ͨ - https://github.com/moznion/proxy-protocol-js - TypeScript - V1/V2྆ରԠ -
encode/decode྆ରԠ
proxy-protocol-js - ۤ࿑ϙΠϯτ:
Example Implementation and Demo
https://github.com/moznion/proxy- protocol-socket-server-example
More Decks by moznion
See All by moznion
go-sqletch
moznion
0
160
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
150
reFACToring
moznion
1
1.4k
cccccc
moznion
1
3.1k
履歴テーブル、今回はこう作りました 〜 Delegated Types編 〜 / How We Built Our History Table This Time — With Delegated Types
moznion
16
16k
「データ無い! 腹立つ! 推論する!」から 「データ無い! 腹立つ! データを作る」へ チームでデータを作り、育てられるようにするまで / How can we create, use, and maintain data ourselves?
moznion
11
7.8k
避けられないI/O待ちに対処する: Rails アプリにおけるSSEとasync gemの活用 / Tackling Inevitable I/O Latency in Rails Apps with SSE and the async gem
moznion
4
10k
RubyKaigi Hack Space in Tokyo & 函館最速 "予習" 会 / RubyKaigi Hack Space in Tokyo & The Fastest Briefing of RubyKaigi 2026 in Hakodate
moznion
1
500
地に足の付いた現実的な技術選定から魔力のある体験を得る『AIレシート読み取り機能』のケーススタディ / From Grounded Tech Choices to Magical UX: A Case Study of AI Receipt Scanning
moznion
7
5.3k
Other Decks in Technology
See All in Technology
Bots in Kiro Crew (One point of contact for ongoing work) | Kiro: Zero to Hero 12
inariku
PRO
1
130
MCPでAIが自分で調べに行く
cdataj
0
170
JAWS_FESTA2026_オンプレ-AWS間プロキシサーバの移行_性能_障害対応で得た実践ノウハウ_高島一晃.pdf
tkazuaki0820
1
110
Reticulum, le réseau cypherpunk dont vous avez besoin !
rlifchitz
0
140
複数システムが同居した 15 年物の AWS アカウントを解体するための考古学
wa6sn
3
140
内製アプリとClaudeスキルのセキュリティチェック、 Backlogの課題で回しています。
ayaka_egaaa
0
180
開発者とAIで共に歩み育てていく OSS開発 ~創造しながら育てていく~ / 20261105 Masaki Okuda
shift_evolve
PRO
1
110
Kiro CLI 入門 (ターミナルと CI で使う) | 目指せ Kiro マスター 03
inariku
PRO
2
140
生成AI時代のIAMのマニアックな話
takuros
6
3.2k
Quick Automate | 目指せ Quick マスター 12
inariku
PRO
1
100
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
0
230
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
430
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
Building the Perfect Custom Keyboard
takai
2
950
Game over? The fight for quality and originality in the time of robots
wayneb77
1
330
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
How to build a perfect <img>
jonoalderson
1
6.2k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
400
Six Lessons from altMBA
skipperchong
29
4.6k
Writing Fast Ruby
sferik
630
63k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280