在Go中配置网络接口

时间:2013-08-14 21:28:30

标签: go

Go是否提供了配置网络接口的方法?我找到了一个非常容易使用的net.Interfaces方法来获取信息,但我想修改网络配置。

1 个答案:

答案 0 :(得分:3)

要修改您的网络配置,最好的方法是调用ipiptablesifconfigbrctl等外部工具。 这是我们在docker(https://github.com/dotcloud/docker/blob/master/network.go#L72

中的方式