You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
408 B

  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. }