diff --git a/internal/infra/config.go b/internal/infra/config.go index cd7cf28..065434f 100644 --- a/internal/infra/config.go +++ b/internal/infra/config.go @@ -13,7 +13,6 @@ const ConfigFilePath = "/config.json" type Config struct { Credentials []map[string]string `json:"all_credentials"` CA CertificateAuthority `json:"ca"` - ProxyAuth BasicAuthCredentials `json:"proxy_auth"` } // CertificateAuthority includes the MITM CA certificate and private key diff --git a/internal/infra/password.go b/internal/infra/password.go deleted file mode 100644 index 7d7f65f..0000000 --- a/internal/infra/password.go +++ /dev/null @@ -1,14 +0,0 @@ -package infra - -import ( - "crypto/rand" - "encoding/hex" -) - -const passwordLength = 24 - -func generatePassword() string { - b := make([]byte, passwordLength) - _, _ = rand.Read(b) - return hex.EncodeToString(b) -} diff --git a/internal/infra/proxy.go b/internal/infra/proxy.go index e6245e6..20e36d3 100644 --- a/internal/infra/proxy.go +++ b/internal/infra/proxy.go @@ -49,15 +49,9 @@ func NewProxy(ctx context.Context, cli *client.Client, params *RunParams, nets . } // Generate and write configuration to disk: - username := "cli-user" - password := generatePassword() proxyConfig := &Config{ Credentials: params.Creds, - ProxyAuth: BasicAuthCredentials{ - Username: username, - Password: password, - }, - CA: ca, + CA: ca, } proxyConfigPath, err := StoreProxyConfig(params.TempDir, proxyConfig) if err != nil { @@ -111,7 +105,7 @@ func NewProxy(ctx context.Context, cli *client.Client, params *RunParams, nets . cli: cli, containerID: proxyContainer.ID, containerName: hostName, - url: fmt.Sprintf("http://%s:%s@%s:1080", username, password, hostName), + url: fmt.Sprintf("http://%s:1080", hostName), CertPath: certPath, proxyConfigPath: proxyConfigPath, }, nil