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
PROXY Protocol aware Proxy Server on Node.js
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
More Decks by moznion
See All by moznion
cccccc
moznion
0
2.1k
履歴テーブル、今回はこう作りました 〜 Delegated Types編 〜 / How We Built Our History Table This Time — With Delegated Types
moznion
16
15k
「データ無い! 腹立つ! 推論する!」から 「データ無い! 腹立つ! データを作る」へ チームでデータを作り、育てられるようにするまで / How can we create, use, and maintain data ourselves?
moznion
11
7.4k
避けられないI/O待ちに対処する: Rails アプリにおけるSSEとasync gemの活用 / Tackling Inevitable I/O Latency in Rails Apps with SSE and the async gem
moznion
4
8.5k
RubyKaigi Hack Space in Tokyo & 函館最速 "予習" 会 / RubyKaigi Hack Space in Tokyo & The Fastest Briefing of RubyKaigi 2026 in Hakodate
moznion
1
440
地に足の付いた現実的な技術選定から魔力のある体験を得る『AIレシート読み取り機能』のケーススタディ / From Grounded Tech Choices to Magical UX: A Case Study of AI Receipt Scanning
moznion
7
5.1k
Chrome Extension Techniques from Hell
moznion
1
320
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
4
8.9k
AIレシート読み取り機能をRuby on Rails on AWSで実現するLLMにまつわるアレコレ / AI-based receipt reading function powered by LLM on Ruby on Rails on AWS
moznion
3
1.3k
Other Decks in Technology
See All in Technology
2026年のソフトウェア開発を考える(2026/07版) / Agentic Software Engineering 2026-07 Findy Edition
twada
PRO
18
8.1k
AICoEでAIネイティブ組織への進化
yukiogawa
0
210
Vポイント分析基盤におけるデータモデリング20年史
taromatsui_cccmkhd
4
680
『モデル + ハーネス』で読み解く AIエージェント入門
oracle4engineer
PRO
2
150
[Droidcon Orlando '26] The Android Lens: Applying Mobile Forensics to AI Performance
amanda_hinchman
1
100
AI時代におけるエンジニアの新たな役割──FDEとクオリアの探求/登壇資料(戸井田 裕貴)
hacobu
PRO
0
280
PHPで作って学ぶリアルタイム音声対話AIとWebSocket入門 by ムナカタ
munakata
0
110
Multicaで30個のミニプロジェクトをAIエージェント運用して見えてきたこと
eiei114
1
600
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
280
CDKで書くECSのベストプラクティス、 改めて考え直す2026 #cdkconf2026
makies
3
920
インシデント事例と パッケージの全量解析に学ぶ ソフトウェアサプライチェーンの守り方 / supply-chain-attack-defense
flatt_security
0
840
ファミコンでPHPを動かす / PHP on the Famicom
tomzoh
2
590
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Balancing Empowerment & Direction
lara
6
1.2k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Speed Design
sergeychernyshev
33
1.9k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
Chasing Engaging Ingredients in Design
codingconduct
0
240
sira's awesome portfolio website redesign presentation
elsirapls
0
300
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
510
Transcript
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