---
title: "Discussion on \"golang读取ssl的ClientHello\" | Hashnode"
description: "Discussion on \"golang读取ssl的ClientHello\". 问题：作为一个反向代理，如何从ssl中读取到host？\n经过半天的看golang的源码……\b其实代码只有几行，但是特么缺看源码的时间，整理思路 到 尝试。。缺花了很长时间。。\n终于把问题解决了，然后写篇博客吧……反而写博客的心里更放松…\n需求是这样的：\n大家知道nginx的https，配置时可以给每一个server配置ssl。\n所以有一个有一个类似的需求:\n    需要根据不同的域名，加载不同的ssl证书。\n但是一般我们不会像nginx，从tcp层读取并解析ssl协议中的\b client hel..."
url: "https://hashnode.com/posts/golangsslclienthello/6456761e36873323f6d73903"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [golang读取ssl的ClientHello](https://mozz.in/golangsslclienthello?utm_source=hashnode&utm_medium=feed)

问题：作为一个反向代理，如何从ssl中读取到host？ 经过半天的看golang的源码……其实代码只有几行，但是特么缺看源码的时间，整理思路 到 尝试。。缺花了很长时间。。 终于把问题解决了，然后写篇博客吧……反而写博客的心里更放松… 需求是这样的： 大家知道nginx的https，配置时可以给每一个server配置ssl。 所以有一个有一个类似的需求: 需要根据不同的域名，加载不同的ssl证书。 但是一般我们不会像nginx，从tcp层读取并解析ssl协议中的 client hel...

Mar 18, 2018 · 1 min read · mozz.in  
Read the article

## Written by

[粒 莫](https://hashnode.com/@molix2)

@molix2 · Shen zhen

  
[View profile](https://hashnode.com/@molix2)

Software Developer @golang @react

Software Developer @golang @react

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
