diff --git a/README.md b/README.md index fe5b253..a1dfd6e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ GoProxy是一个功能强大的Go语言HTTP代理库,支持HTTP、HTTPS和WebS ## 安装 ```bash -go get github.com/goproxy +go get github.com/darkit/goproxy ``` ## 快速开始 @@ -44,7 +44,7 @@ import ( "log" "net/http" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/proxy" ) func main() { @@ -68,8 +68,8 @@ import ( "log" "net/http" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/proxy" ) func main() { @@ -112,8 +112,8 @@ import ( "log" "net/http" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/proxy" ) func main() { @@ -163,7 +163,7 @@ import ( "log" "net/http" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/proxy" ) func main() { @@ -217,8 +217,8 @@ import ( "net/http" "time" - "github.com/goproxy/internal/metrics" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/metrics" + "github.com/darkit/goproxy/internal/proxy" ) func main() { @@ -279,8 +279,8 @@ import ( "net/http" "time" - "github.com/goproxy/internal/dns" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/dns" + "github.com/darkit/goproxy/internal/proxy" ) func main() { @@ -351,8 +351,8 @@ import ( "net/http" "os" - "github.com/goproxy/internal/dns" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/dns" + "github.com/darkit/goproxy/internal/proxy" ) func main() { diff --git a/README_DNS.md b/README_DNS.md index 56d434f..04c64c6 100644 --- a/README_DNS.md +++ b/README_DNS.md @@ -33,7 +33,7 @@ 确保已安装Go(建议1.22或更高版本): ```bash -git clone https://github.com/ouqiang/goproxy +git clone github.com/darkit/goproxy cd goproxy go build ./... ``` @@ -127,7 +127,7 @@ go run cmd/wildcard_dns_proxy/main.go -hosts examples/wildcard_hosts.txt ### 使用DNS解析器 ```go -import "github.com/goproxy/internal/dns" +import "github.com/darkit/goproxy/internal/dns" // 创建解析器 resolver := dns.NewResolver( @@ -184,7 +184,7 @@ GoProxy支持三种负载均衡策略: ### 使用DNS拨号器 ```go -import "github.com/goproxy/internal/dns" +import "github.com/darkit/goproxy/internal/dns" // 创建解析器 resolver := dns.NewResolver( diff --git a/cmd/custom_dns_https_proxy/main.go b/cmd/custom_dns_https_proxy/main.go index ee8e691..8501874 100644 --- a/cmd/custom_dns_https_proxy/main.go +++ b/cmd/custom_dns_https_proxy/main.go @@ -6,9 +6,9 @@ import ( "net/http" "time" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/dns" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/dns" + "github.com/darkit/goproxy/internal/proxy" ) // CustomDNSDelegate HTTPS代理委托 diff --git a/cmd/custom_dns_proxy/main.go b/cmd/custom_dns_proxy/main.go index 4e26565..5c9e4d5 100644 --- a/cmd/custom_dns_proxy/main.go +++ b/cmd/custom_dns_proxy/main.go @@ -6,9 +6,9 @@ import ( "net/http" "time" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/dns" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/dns" + "github.com/darkit/goproxy/internal/proxy" ) // CustomDNSDelegate 自定义DNS委托 diff --git a/cmd/custom_port_proxy/main.go b/cmd/custom_port_proxy/main.go index ae08dd6..63013e9 100644 --- a/cmd/custom_port_proxy/main.go +++ b/cmd/custom_port_proxy/main.go @@ -6,9 +6,9 @@ import ( "net/http" "time" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/dns" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/dns" + "github.com/darkit/goproxy/internal/proxy" ) // CustomPortDelegate 自定义端口委托 diff --git a/cmd/example/main.go b/cmd/example/main.go index 4abd4c2..aaa7023 100644 --- a/cmd/example/main.go +++ b/cmd/example/main.go @@ -10,12 +10,12 @@ import ( "syscall" "time" - "github.com/goproxy/internal/cache" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/healthcheck" - "github.com/goproxy/internal/loadbalance" - "github.com/goproxy/internal/metrics" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/cache" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/healthcheck" + "github.com/darkit/goproxy/internal/loadbalance" + "github.com/darkit/goproxy/internal/metrics" + "github.com/darkit/goproxy/internal/proxy" ) var ( diff --git a/cmd/http_to_https_proxy/main.go b/cmd/http_to_https_proxy/main.go index 3d302f4..936a8f5 100644 --- a/cmd/http_to_https_proxy/main.go +++ b/cmd/http_to_https_proxy/main.go @@ -6,8 +6,8 @@ import ( "net/http" "time" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/proxy" ) // CustomDelegate 自定义委托,用于HTTP到HTTPS代理 diff --git a/cmd/https_to_https_proxy/main.go b/cmd/https_to_https_proxy/main.go index e8a1e5c..b843f77 100644 --- a/cmd/https_to_https_proxy/main.go +++ b/cmd/https_to_https_proxy/main.go @@ -7,8 +7,8 @@ import ( "net/http" "time" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/proxy" ) // 自定义委托,用于HTTPS到HTTPS代理 diff --git a/cmd/reverse_proxy_example/main.go b/cmd/reverse_proxy_example/main.go index 054e306..f3de688 100644 --- a/cmd/reverse_proxy_example/main.go +++ b/cmd/reverse_proxy_example/main.go @@ -10,9 +10,9 @@ import ( "syscall" "time" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/metrics" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/metrics" + "github.com/darkit/goproxy/internal/proxy" ) var ( diff --git a/cmd/wildcard_dns_proxy/main.go b/cmd/wildcard_dns_proxy/main.go index 18799e9..2608942 100644 --- a/cmd/wildcard_dns_proxy/main.go +++ b/cmd/wildcard_dns_proxy/main.go @@ -6,9 +6,9 @@ import ( "net/http" "time" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/dns" - "github.com/goproxy/internal/proxy" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/dns" + "github.com/darkit/goproxy/internal/proxy" ) // WildcardDNSDelegate 带有泛解析功能的委托 diff --git a/go.mod b/go.mod index 38d8a2d..acb28c6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/goproxy +module github.com/darkit/goproxy go 1.24.0 diff --git a/internal/proxy/options.go b/internal/proxy/options.go index 6087657..7ef4f01 100644 --- a/internal/proxy/options.go +++ b/internal/proxy/options.go @@ -5,11 +5,11 @@ import ( "net/http/httptrace" "time" - "github.com/goproxy/internal/cache" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/healthcheck" - "github.com/goproxy/internal/loadbalance" - "github.com/goproxy/internal/metrics" + "github.com/darkit/goproxy/internal/cache" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/healthcheck" + "github.com/darkit/goproxy/internal/loadbalance" + "github.com/darkit/goproxy/internal/metrics" ) // Option 用于配置代理选项的函数类型 diff --git a/internal/proxy/proxy.go b/internal/proxy/proxy.go index f23ec59..82269d5 100644 --- a/internal/proxy/proxy.go +++ b/internal/proxy/proxy.go @@ -17,12 +17,12 @@ import ( "sync/atomic" "time" - "github.com/goproxy/internal/cache" - "github.com/goproxy/internal/config" - "github.com/goproxy/internal/healthcheck" - "github.com/goproxy/internal/loadbalance" - "github.com/goproxy/internal/metrics" - "github.com/goproxy/internal/middleware" + "github.com/darkit/goproxy/internal/cache" + "github.com/darkit/goproxy/internal/config" + "github.com/darkit/goproxy/internal/healthcheck" + "github.com/darkit/goproxy/internal/loadbalance" + "github.com/darkit/goproxy/internal/metrics" + "github.com/darkit/goproxy/internal/middleware" "github.com/ouqiang/websocket" "github.com/viki-org/dnscache" ) diff --git a/internal/proxy/reverse_proxy.go b/internal/proxy/reverse_proxy.go index e51ea6a..502af86 100644 --- a/internal/proxy/reverse_proxy.go +++ b/internal/proxy/reverse_proxy.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/goproxy/internal/rewriter" - "github.com/goproxy/internal/router" + "github.com/darkit/goproxy/internal/rewriter" + "github.com/darkit/goproxy/internal/router" ) // ReverseProxy 反向代理 diff --git a/mitm-proxy.crt b/mitm-proxy.crt deleted file mode 100644 index e287170..0000000 --- a/mitm-proxy.crt +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICJzCCAcygAwIBAgIITWWCIQf8/VIwCgYIKoZIzj0EAwIwUzEOMAwGA1UEBhMF -Q2hpbmExDzANBgNVBAgTBkZ1SmlhbjEPMA0GA1UEBxMGWGlhbWVuMRAwDgYDVQQK -EwdHb3Byb3h5MQ0wCwYDVQQDEwRNYXJzMB4XDTIyMDMyNTA1NDgwMFoXDTQyMDQy -NTA1NDgwMFowUzEOMAwGA1UEBhMFQ2hpbmExDzANBgNVBAgTBkZ1SmlhbjEPMA0G -A1UEBxMGWGlhbWVuMRAwDgYDVQQKEwdHb3Byb3h5MQ0wCwYDVQQDEwRNYXJzMFkw -EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEf0mhVJmuTmxnLimKshdEE4+PYdxvBfQX -mRgsFV5KHHmxOrVJBFC/nDetmGowkARShWtBsX1Irm4w6i6Qk2QliKOBiTCBhjAO -BgNVHQ8BAf8EBAMCAQYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMBIG -A1UdEwEB/wQIMAYBAf8CAQIwHQYDVR0OBBYEFBI5TkWYcvUIWsBAdffs833FnBrI -MCIGA1UdEQQbMBmBF3FpbmdxaWFubHVkYW9AZ21haWwuY29tMAoGCCqGSM49BAMC -A0kAMEYCIQCk1DhW7AmIW/n/QLftQq8BHZKLevWYJ813zdrNr5kXlwIhAIVvqglY -9BkYWg4NEe/mVO4C5Vtu4FnzNU9I+rFpXVSO ------END CERTIFICATE----- \ No newline at end of file