Goでプライベートネットワークへのアクセスを制限する
DRANK
Go において、いわゆる SSRF (Server Side Request Forgery) を防ぐような目的で、内部 IP アドレスにアクセスしない HTTP クライアントを作るには hakobe/paranoidhttp が便利だった。ただ、近年ではこれが作られて以降の Go 側のアップデートとして、net.Dialer.Control の登場がある(Go 1.11 より)。 type Dialer struct { ... // If Control is not nil, it is called after creating the network // connection bu…