This file is indexed.

/usr/share/gocode/src/github.com/lxc/lxd/lxd-bridge/lxd-bridge-proxy/main.go is in golang-github-lxc-lxd-dev 2.0.2-0ubuntu1~16.04.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main

import (
	"flag"
	"fmt"
	"log"
	"net/http"
	"net/http/httputil"
)

func NewProxy() *httputil.ReverseProxy {
	director := func(req *http.Request) {
		if req.Method == "CONNECT" {
			fmt.Printf("CONNECT: %s\n", req.Host)
		}
	}
	return &httputil.ReverseProxy{Director: director}
}

func main() {
	addr := flag.String("addr", "[fe80::1%lxdbr0]:13128", "proxy listen address")
	flag.Parse()

	log.Fatal(http.ListenAndServe(*addr, NewProxy()))
}