Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Root = &cobra.Command{ Use: "dctor <command>", Short: "Tor proxy for DC network", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { fmt.Println("Starting Tor node...") var dw io.Writer if debug, _ := cmd.Flags().GetBool("debug"); debug { dw = os.Stderr } dataDir, _ := cmd.Flags().GetString("data") t, err := tor.Start(nil, &tor.StartConf{ DataDir: dataDir, ProcessCreator: ltor.Creator, DebugWriter: dw, }) if err != nil { return fmt.Errorf("failed to start Tor: %v", err) } Tor = t return nil }, PersistentPostRun: func(cmd *cobra.Command, args []string) { if Tor != nil { _ = Tor.Close() } }, }
View Source
var Tor *tor.Tor
Functions ¶
This section is empty.
Types ¶
type ClientProxy ¶
type ClientProxy struct {
// contains filtered or unexported fields
}
func NewClientProxy ¶
func (*ClientProxy) ServeTorConn ¶
func (p *ClientProxy) ServeTorConn(conn net.Conn) error
type HubProxy ¶
type HubProxy struct {
// contains filtered or unexported fields
}
func NewHubProxy ¶
Click to show internal directories.
Click to hide internal directories.