<commit_before><commit_msg>fixes #21, example add SoKeepalive to outgoing connections<commit_after>package main

import (
	"github.com/elazarl/goproxy"
	"log"
	"flag"
	"net"
	"net/http"
)

func main() {
	verbose := flag.Bool("v", false, "should every proxy request be logged to stdout")
	addr := flag.String("addr", ":8080", "proxy listen address")
	flag.Parse()
	proxy := goproxy.NewProxyHttpServer()
	proxy.Tr.Dial = func(network, addr string) (c net.Conn, err error) {
		c, err = net.Dial(network, addr)
		if c, ok := c.(*net.TCPConn); err != nil && ok {
			c.SetKeepAlive(true)
		}
		return
	}
	proxy.Verbose = *verbose
	log.Fatal(http.ListenAndServe(*addr, proxy))
}
{'fraction_non_alphanumeric': 0.16095380029806258, 'fraction_numerical': 0.00894187779433681, 'mean_word_length': 4.463414634146342, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4720879', 'n_tokens_mistral': 265, 'n_tokens_neox': 250, 'n_words': 62}