add debugging version

This commit is contained in:
2025-03-17 08:48:04 +11:00
parent 89583a609c
commit 491fa8fb98
6 changed files with 13 additions and 106 deletions

View File

@@ -1,82 +0,0 @@
version: 2.1
orbs:
win: circleci/windows@1.0.0
workflows:
workflow:
jobs:
- go-build:
name: Go 1.14
docker-image: circleci/golang:1.14
build-as-module: true
- go-build:
name: Go 1.13
docker-image: circleci/golang:1.13
build-as-module: true
- go-build:
name: Go 1.12
docker-image: circleci/golang:1.12
- go-build:
name: Go 1.11
docker-image: circleci/golang:1.11
- go-build:
name: Go 1.10
docker-image: circleci/golang:1.10
- go-build:
name: Go 1.9
docker-image: circleci/golang:1.9
- go-build:
name: Go 1.8
docker-image: circleci/golang:1.8
- go-build-windows:
name: Windows
jobs:
go-build:
parameters:
docker-image:
type: string
build-as-module:
type: boolean
default: false
docker:
- image: <<parameters.docker-image>>
working_directory: /go/src/github.com/launchdarkly/go-ntlm-proxy-auth
steps:
- checkout
- unless:
condition: <<parameters.build-as-module>>
steps:
- run: go get -t .
- run: go build
go-build-windows:
executor:
name: win/vs2019
shell: powershell.exe
environment:
GOPATH: C:\Users\VssAdministrator\go
PACKAGE_PATH: github.com/launchdarkly/go-ntlm-proxy-auth
steps:
- checkout
- run: go version
- run:
name: move source
command: |
go env GOPATH
mkdir ${env:GOPATH}\src\${env:PACKAGE_PATH}
mv * ${env:GOPATH}\src\${env:PACKAGE_PATH}
- run:
name: build and test
command: |
cd ${env:GOPATH}\src\${env:PACKAGE_PATH}
go get -t .
go test -v -race ./...

View File

@@ -1,8 +0,0 @@
template:
name: go
env:
LD_RELEASE_GO_IMPORT_PATH: github.com/launchdarkly/go-ntlm-proxy-auth
publications:
- url: https://godoc.org/github.com/launchdarkly/go-ntlm-proxy-auth
description: documentation

View File

@@ -6,7 +6,7 @@
With this package, you can connect to http/https servers protected by an NTLM proxy in Golang.
This is a fork of https://github.com/Codehardt/go-ntlm-proxy-auth which adds support for HTTPS proxy URLs. It also uses the fork https://github.com/launchdarkly/go-ntlmssp instead of `github.com/Azure/go-ntlmssp`.
This is a fork of https://github.com/launchdarkly/go-ntlm-proxy-auth to enable extra debugging
## Example: NewNTLMProxyDialContext

8
go.mod
View File

@@ -1,5 +1,7 @@
module github.com/launchdarkly/go-ntlm-proxy-auth
module git.coadcorp.com/nathan/go-ntlm-proxy-auth
go 1.13
go 1.24.1
require github.com/launchdarkly/go-ntlmssp v1.0.1
require git.coadcorp.com/nathan/go-ntlmssp v1.0.2
require golang.org/x/crypto v0.36.0 // indirect

13
go.sum
View File

@@ -1,9 +1,4 @@
github.com/launchdarkly/go-ntlmssp v1.0.1 h1:snB77118TQvf9tfHrkSyrIop/UX5e5VD2D2mv7Kh3wE=
github.com/launchdarkly/go-ntlmssp v1.0.1/go.mod h1:/cq3t2JyALD7GdVF5BEWcEuGlIGa44FZ4v4CVk7vuCY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM=
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
git.coadcorp.com/nathan/go-ntlmssp v1.0.2 h1:7vx6sF5AK97ff+1PXxQnCd3AZ4ey/X61Qd4y7Y2OG7s=
git.coadcorp.com/nathan/go-ntlmssp v1.0.2/go.mod h1:/0x9Ju5bWF978Vb+kMMfl+GYk5/j7CFq5yAsjEXOG8g=
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=

View File

@@ -7,13 +7,13 @@ import (
"encoding/base64"
"errors"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
"net/url"
"strings"
ntlmssp "github.com/launchdarkly/go-ntlmssp"
ntlmssp "git.coadcorp.com/nathan/go-ntlmssp"
)
// DialContext is the DialContext function that should be wrapped with a
@@ -86,7 +86,7 @@ func dialAndNegotiate(addr, proxyUsername, proxyPassword, proxyDomain string, ba
debugf("ntlm> Could not read response from proxy: %s", err)
return conn, err
}
_, err = ioutil.ReadAll(resp.Body)
_, err = io.ReadAll(resp.Body)
if err != nil {
debugf("ntlm> Could not read response body from proxy: %s", err)
return conn, err