(import (chicken base)) (import (chicken io)) (import (chicken tcp)) (import http-client) (import intarweb) (import openssl) (import uri-common) (define (http-server-connector uri proxy) (let ((remote-end (or proxy uri))) (case (uri-scheme remote-end) ((#f http) (tcp-connect (uri-host remote-end) (uri-port remote-end))) ((https) (receive (in out) (ssl-connect* hostname: (uri-host remote-end) port: (uri-port remote-end) sni-name: #t verify?: #f) ; accept invalid certs (values in out))) (else (error "Unsupported protocol" (uri-scheme remote-end)))))) (server-connector http-server-connector) (define url "https://repology.org") (print (with-input-from-request url #f read-string))