I have a go modgitlab.org/at
, place at my private gitlab code.demo.org/at
,which use HTTP
protocol
My GOENV(go env
):
GOVERSION="go1.19.13"
GOPRIVATE="code.demo.org"
GOINSECURE="code.demo.org"
And my go.mod
:
module code.demo.org/demo
go 1.19
require (
gitlab.org/at v0.0.0-00010101000000-000000000000
)
replace gitlab.org/at => code.demo.org/at
I use go mod tidy
,it error:
unrecognized import path "code.demo.org/at": parse https://code.demo.org/at?go-get=1: no go-import meta tags
That seems it use HTTPS
to download this package, even has go env GOINSECURE=code.demo.org
I want use HTTP
to download the package
Reject the request to https://code.demo.org, then:
iptables -A OUTPUT -d $IP -p tcp --dport 443 -j REJECT
netsh advfirewall firewall add rule name="Block_Outgoing_Connection" dir=out action=block remoteip=$IP protocol=TCP remoteport=443