狠狠撸

狠狠撸Share a Scribd company logo
Source code reading and implementation learning
Shadowsocks Go
Eric-Guo Github
@ericguo Ruby-China
@ecguo Twiter
2017-06-20
What’s Shadowsocks
? https://shadowsocks.org/en/spec/Protocol.html
? Shadowsocks is a secure split proxy loosely based on SOCKS5.
? client <---> ss-local <--[encrypted]--> ss-remote <---> target
Shadowsocks vs …
? StrongSwan
? OpenVPN
? PPTP
? sshuttle
SS is abbreviation of ShadowSocks
SS vs SSR
https://github.com/shadowsocks/shadowsocks
https://www.zybuluo.com/yiranphp/note/632579
https://github.com/shadowsocksr/shadowsocksr
https://github.com/breakwa11/shadowsocks-
rss/issues/38#issuecomment-243106134
Shadowsocks Implementation
? https://shadowsocks.org/en/spec/Implementations.html
? Python
? C
? Node.js
? Go
? Ruby
? Erlang
Shadowsocks Enhance
? DNS (UDP) relay
? OTA
? AEAD
? kcptun
? obfsplugin
Shadowsocks Go
? Client & Server
? Original SS
? OTA (deprecated)
? UDP relay on server side support
Code Reading - server main
? cmd/shadowsocks-server/server.go:312 run(port, password string)
? To listen the incoming link from ss client
? cmd/shadowsocks-server/server.go:111 handleConnection(conn *ss.Conn)
? Parse incoming conn, Dial to remote, Pipe line both conn and remote
? cmd/shadowsocks-server/server.go:18 PipeThenClose(src, dst net.Conn)
? Read src and Write to dst
Code Reading - parse incoming conn
? Three type of typeIPv4, typeIPv6 and typeDm.
? typeDm used in browser
Code Reading - ss.NewConn
? shadowsocks-go/shadowsocks/conn.go
? shadowsocks-go/shadowsocks/encrypt.go

More Related Content

Similar to Shadowsocks Go (20)

[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon
hackersuli
?
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
CODE BLUE
?
Basics of ssl
Basics of sslBasics of ssl
Basics of ssl
n|u - The Open Security Community
?
Adventures with Podman and Varlink
Adventures with Podman and VarlinkAdventures with Podman and Varlink
Adventures with Podman and Varlink
Jeremy Brown
?
Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...
Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...
Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...
JPCERT Coordination Center
?
インフラ野郎Azureチーム Night
インフラ野郎Azureチーム Nightインフラ野郎Azureチーム Night
インフラ野郎Azureチーム Night
Toru Makabe
?
Spark Streamingによるリアルタイムユーザ属性推定
Spark Streamingによるリアルタイムユーザ属性推定Spark Streamingによるリアルタイムユーザ属性推定
Spark Streamingによるリアルタイムユーザ属性推定
Yoshiyasu SAEKI
?
Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8
Yoshiki Kurihara
?
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
EC-Council
?
Testing Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionTesting Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam edition
Jose Manuel Ortega Candel
?
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
Codemotion
?
WebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in DepthWebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in Depth
yalegko
?
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
Sergey Gordeychik
?
DevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfDevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdf
kanedafromparis
?
Outlook and Exchange for the bad guys
Outlook and Exchange for the bad guysOutlook and Exchange for the bad guys
Outlook and Exchange for the bad guys
Nick Landers
?
seminar
seminarseminar
seminar
Souvik Kolay
?
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to come
Konrad Malawski
?
Cloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep DiveCloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep Dive
Kazuto Kusama
?
Switchdev - No More SDK
Switchdev - No More SDKSwitchdev - No More SDK
Switchdev - No More SDK
Kernel TLV
?
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
Soroosh Khodami
?
[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] ?l? sz?vet a fémvázon: Python és gépi tanulás a Zeek platformon
hackersuli
?
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
CODE BLUE
?
Adventures with Podman and Varlink
Adventures with Podman and VarlinkAdventures with Podman and Varlink
Adventures with Podman and Varlink
Jeremy Brown
?
Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...
Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...
Case Studies and Lessons Learned from SSL/TLS Certificate Verification Vulner...
JPCERT Coordination Center
?
インフラ野郎Azureチーム Night
インフラ野郎Azureチーム Nightインフラ野郎Azureチーム Night
インフラ野郎Azureチーム Night
Toru Makabe
?
Spark Streamingによるリアルタイムユーザ属性推定
Spark Streamingによるリアルタイムユーザ属性推定Spark Streamingによるリアルタイムユーザ属性推定
Spark Streamingによるリアルタイムユーザ属性推定
Yoshiyasu SAEKI
?
Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8
Yoshiki Kurihara
?
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
EC-Council
?
Testing Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionTesting Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam edition
Jose Manuel Ortega Candel
?
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
Codemotion
?
WebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in DepthWebGoat.SDWAN.Net in Depth
WebGoat.SDWAN.Net in Depth
yalegko
?
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
Sergey Gordeychik
?
DevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdfDevOpSec_DockerNPodMan-20230220.pdf
DevOpSec_DockerNPodMan-20230220.pdf
kanedafromparis
?
Outlook and Exchange for the bad guys
Outlook and Exchange for the bad guysOutlook and Exchange for the bad guys
Outlook and Exchange for the bad guys
Nick Landers
?
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to come
Konrad Malawski
?
Cloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep DiveCloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep Dive
Kazuto Kusama
?
Switchdev - No More SDK
Switchdev - No More SDKSwitchdev - No More SDK
Switchdev - No More SDK
Kernel TLV
?
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
Soroosh Khodami
?

More from Eric Guo (7)

使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai
使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai
使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai
Eric Guo
?
二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024
二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024
二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024
Eric Guo
?
全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system
全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system
全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system
Eric Guo
?
Dragon Ruby 孩子的游戏编程.pdf
Dragon Ruby 孩子的游戏编程.pdfDragon Ruby 孩子的游戏编程.pdf
Dragon Ruby 孩子的游戏编程.pdf
Eric Guo
?
Rails 6 frontend frameworks
Rails 6 frontend frameworksRails 6 frontend frameworks
Rails 6 frontend frameworks
Eric Guo
?
Web TCard - Speed optimization
Web TCard - Speed optimizationWeb TCard - Speed optimization
Web TCard - Speed optimization
Eric Guo
?
Git extension-training
Git extension-trainingGit extension-training
Git extension-training
Eric Guo
?
使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai
使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai
使用 Dify 做 AI 应用 - 接触2周的一些小想法小心得分享 Ruby Tuesday Shanghai
Eric Guo
?
二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024
二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024
二次开发开源项目管理工具 OpenProject by Eric-Guo at RubyConf China 2024
Eric Guo
?
全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system
全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system
全栈三个月开发绩效系统 using Rails 7.1 to develop people performance evaluation system
Eric Guo
?
Dragon Ruby 孩子的游戏编程.pdf
Dragon Ruby 孩子的游戏编程.pdfDragon Ruby 孩子的游戏编程.pdf
Dragon Ruby 孩子的游戏编程.pdf
Eric Guo
?
Rails 6 frontend frameworks
Rails 6 frontend frameworksRails 6 frontend frameworks
Rails 6 frontend frameworks
Eric Guo
?
Web TCard - Speed optimization
Web TCard - Speed optimizationWeb TCard - Speed optimization
Web TCard - Speed optimization
Eric Guo
?
Git extension-training
Git extension-trainingGit extension-training
Git extension-training
Eric Guo
?
Ad

Recently uploaded (20)

Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
?
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
?
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
?
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
?
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
?
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
?
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
?
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
?
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
?
GIS and FME: The Foundation to Improve the Locate Process of Utilities
GIS and FME: The Foundation to Improve the Locate Process of UtilitiesGIS and FME: The Foundation to Improve the Locate Process of Utilities
GIS and FME: The Foundation to Improve the Locate Process of Utilities
Safe Software
?
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
?
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
?
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to KnowWhat is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
SMACT Works
?
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
?
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
?
FME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy AppFME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy App
Safe Software
?
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
?
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
?
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
?
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
?
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
?
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
?
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
?
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
?
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
?
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
?
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
?
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
?
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
?
GIS and FME: The Foundation to Improve the Locate Process of Utilities
GIS and FME: The Foundation to Improve the Locate Process of UtilitiesGIS and FME: The Foundation to Improve the Locate Process of Utilities
GIS and FME: The Foundation to Improve the Locate Process of Utilities
Safe Software
?
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
?
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
?
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to KnowWhat is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
What is Oracle EPM A Guide to Oracle EPM Cloud Everything You Need to Know
SMACT Works
?
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
?
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
?
FME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy AppFME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy App
Safe Software
?
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
?
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
?
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
?
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
?
Ad

Shadowsocks Go

  • 1. Source code reading and implementation learning Shadowsocks Go Eric-Guo Github @ericguo Ruby-China @ecguo Twiter 2017-06-20
  • 2. What’s Shadowsocks ? https://shadowsocks.org/en/spec/Protocol.html ? Shadowsocks is a secure split proxy loosely based on SOCKS5. ? client <---> ss-local <--[encrypted]--> ss-remote <---> target
  • 3. Shadowsocks vs … ? StrongSwan ? OpenVPN ? PPTP ? sshuttle
  • 4. SS is abbreviation of ShadowSocks SS vs SSR https://github.com/shadowsocks/shadowsocks https://www.zybuluo.com/yiranphp/note/632579 https://github.com/shadowsocksr/shadowsocksr https://github.com/breakwa11/shadowsocks- rss/issues/38#issuecomment-243106134
  • 6. Shadowsocks Enhance ? DNS (UDP) relay ? OTA ? AEAD ? kcptun ? obfsplugin
  • 7. Shadowsocks Go ? Client & Server ? Original SS ? OTA (deprecated) ? UDP relay on server side support
  • 8. Code Reading - server main ? cmd/shadowsocks-server/server.go:312 run(port, password string) ? To listen the incoming link from ss client ? cmd/shadowsocks-server/server.go:111 handleConnection(conn *ss.Conn) ? Parse incoming conn, Dial to remote, Pipe line both conn and remote ? cmd/shadowsocks-server/server.go:18 PipeThenClose(src, dst net.Conn) ? Read src and Write to dst
  • 9. Code Reading - parse incoming conn ? Three type of typeIPv4, typeIPv6 and typeDm. ? typeDm used in browser
  • 10. Code Reading - ss.NewConn ? shadowsocks-go/shadowsocks/conn.go ? shadowsocks-go/shadowsocks/encrypt.go