direct.go 408 B

123456789101112131415161718
  1. // Copyright 2011 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package proxy
  5. import (
  6. "net"
  7. )
  8. type direct struct{}
  9. // Direct is a direct proxy: one that makes network connections directly.
  10. var Direct = direct{}
  11. func (direct) Dial(network, addr string) (net.Conn, error) {
  12. return net.Dial(network, addr)
  13. }