proxyscotch icon indicating copy to clipboard operation
proxyscotch copied to clipboard

Failed to verify certificate

Open Caelebs opened this issue 11 months ago • 5 comments

I have an HTTPS service with a certificate issued based on a domain name, but proxyscotch tells me that it cannot validate the certificate when I access it from an IP address in a development environment. Is there any option or configuration to turn off certificate validation? Just like Insomnia, I can uncheck "Validate certificates".

proxyscotch  | 2024/02/26 15:10:51 Failed to write response body: Post "https://10.10.10.109:10010/robot/controlTask": tls: failed to verify certificate: x509: cannot validate certificate for 10.10.10.109 because it doesn't contain any IP SANs

Here's my compose config file

version: '3.8'

services:
  proxyscotch:
    image: hoppscotch/proxyscotch:latest
    container_name: proxyscotch
    hostname: proxyscotch-1
    ports:
      - '9159:9159'
    restart: always
    networks:
      - default
networks:
  default:
    external: true
    name: demo_default

Caelebs avatar Feb 26 '24 07:02 Caelebs

Looks like this will require a code tweak to expose this as a config option. I'll look into this.

SamJakob avatar Feb 26 '24 10:02 SamJakob

Got similar error while proxying requests to the https with the self-signed certificate: Failed to write response body: Post "https://host" tls: failed to verify certificate: x509: certificate signed by unknown authority

@SamJakob any plans to add support for that soon?

r-brown avatar Mar 18 '24 21:03 r-brown

You can modify line 319 in the libproxy/proxy.go file to be as follows:

var client = &http.Client{  
	Transport: &http.Transport{  
		TLSClientConfig: &tls.Config{  
			InsecureSkipVerify: true,  
		},  
	},  
}

Then repackage the docker image. @r-brown

Caelebs avatar Apr 08 '24 09:04 Caelebs