Skip to content

Instantly share code, notes, and snippets.

View LucaFilipozzi's full-sized avatar

Luca Filipozzi LucaFilipozzi

View GitHub Profile

acme4bigip

The purpose of these scripts is to help implement HTTPS Everywhere using acmetool and F5 BigIP LTM.

Usage

Set up acmetool as normal.

DNS

@LucaFilipozzi
LucaFilipozzi / get_unix_socket_peer_info.py
Last active March 30, 2017 07:59
python implementation of getpeereid() and getpeerpid() for darwin
#!/usr/bin/python
# vim: set ts=4 sw=4 et ai si:
import socket
import struct
def getpeereid(sock):
LOCAL_PEERCRED = 0x001
fmt = struct.Struct('2Ih16I') # see /usr/include/sys/ucred.h struct xucred
res = tuple(fmt.unpack(sock.getsockopt(0, LOCAL_PEERCRED, fmt.size)))

Keybase proof

I hereby claim:

  • I am LucaFilipozzi on github.
  • I am lucafilipozzi (https://keybase.io/lucafilipozzi) on keybase.
  • I have a public key whose fingerprint is CE98 F258 BB34 4F29 F4F5 AF45 B575 4A69 B6BE 608C

To claim this, I am signing this object:

os_http_be.map and os_sni_passthrough.map are both just empty files
@LucaFilipozzi
LucaFilipozzi / proxy_copy.go
Last active June 18, 2023 11:03 — forked from jbardin/proxy_copy.go
Go TCP Proxy pattern
package proxy
import (
"io"
"log"
"net"
)
func Proxy(srvConn, cliConn *net.TCPConn) {
// channels to wait on the close event for each connection