inetaf / tcpproxy

Proxy TCP connections based on static rules, HTTP Host headers, and SNI server names (Go package or binary)
https://pkg.go.dev/github.com/inetaf/tcpproxy
Apache License 2.0
1.26k stars 157 forks source link

Wrong module name #33

Closed cyd01 closed 3 years ago

cyd01 commented 3 years ago

Hello I used to import your project into mine

import (
"github.com/inetaf/tcpproxy"
)

Recently you've added go.mod in your project.
But it seems you've made a wrong module name: module inet.af/tcpproxy instead of module github.com/inetaf/tcpproxy.

When I go get my project I got this error:

go get
go get: github.com/inetaf/tcpproxy@none updating to
    github.com/inetaf/tcpproxy@v0.0.0-20210824174053-2e577fef49e2: parsing go.mod:
    module declares its path as: inet.af/tcpproxy
            but was required as: github.com/inetaf/tcpproxy
josegonzalez commented 3 years ago

I'm also seeing this, but it appears to work if using inet.af/tcpproxy/cmd as the module.

yangzhen0512 commented 3 years ago

It works if adding replace in go.mod: replace inet.af/tcpproxy v0.0.0-20210824174053-2e577fef49e2 => github.com/inetaf/tcpproxy v0.0.0-20210824174053-2e577fef49e2

bradfitz commented 3 years ago

Yes, import it as inet.af/tcpproxy/* instead of the github name.