{"action":"opened","issue":{"url":"https://api.github.com/repos/elazarl/goproxy/issues/202","repository_url":"https://api.github.com/repos/elazarl/goproxy","labels_url":"https://api.github.com/repos/elazarl/goproxy/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/elazarl/goproxy/issues/202/comments","events_url":"https://api.github.com/repos/elazarl/goproxy/issues/202/events","html_url":"https://github.com/elazarl/goproxy/issues/202","id":201338655,"number":202,"title":"be able to configure defaultTLSConfig from the goproxy-eavesdropper example?","user":{"login":"rgl","id":43356,"avatar_url":"https://avatars.githubusercontent.com/u/43356?v=3","gravatar_id":"","url":"https://api.github.com/users/rgl","html_url":"https://github.com/rgl","followers_url":"https://api.github.com/users/rgl/followers","following_url":"https://api.github.com/users/rgl/following{/other_user}","gists_url":"https://api.github.com/users/rgl/gists{/gist_id}","starred_url":"https://api.github.com/users/rgl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgl/subscriptions","organizations_url":"https://api.github.com/users/rgl/orgs","repos_url":"https://api.github.com/users/rgl/repos","events_url":"https://api.github.com/users/rgl/events{/privacy}","received_events_url":"https://api.github.com/users/rgl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-17T16:36:21Z","updated_at":"2017-01-17T16:36:21Z","closed_at":null,"body":"Is there a way to configure the [defaultTLSConfig](https://github.com/elazarl/goproxy/blob/master/certs.go#L20) from the goproxy-eavesdropper example?\r\n\r\nmy goal is to try to create a dummy caching server that just saves requests to disk and replies with the cached response if they already exist. I'm not sure If I should just implement a `ConnectAction` instead of trying to set `defaultTLSConfig`. But as we can already set `GoproxyCa` maybe having `defaultTLSConfig` private was an overlook (or the other way around)?\r\n\r\nFYI, as a simple test, I was able to configure the CA certificate with something like:\r\n\r\n```go\r\n...\r\n\tkeypair := flag.String(\"k\", \"\", \"TLS keypair to use\")\r\n...\r\n\tflag.Parse()\r\n\tif keypair != nil {\r\n\t\tkp, err := ioutil.ReadFile(*keypair)\r\n\t\tif err != nil {\r\n\t\t\tlog.Fatal(err)\r\n\t\t}\r\n\t\tca, err := tls.X509KeyPair(kp, kp)\r\n\t\tif err != nil {\r\n\t\t\tlog.Fatal(err)\r\n\t\t}\r\n\t\tgoproxy.GoproxyCa = ca\r\n\t}\r\n```"}}
{"actor":{"display_login":"rgl"}}