Skip to content

Instantly share code, notes, and snippets.

chantra chantra

Block or report user

Report or block chantra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View godns_soreuseport.diff
diff --git a/server.go b/server.go
index 685753f..8cf4038 100644
--- a/server.go
+++ b/server.go
@@ -10,6 +10,8 @@ import (
"net"
"sync"
"time"
+
+ "github.com/libp2p/go-reuseport"
View reflect_soreuseport.diff
diff --git a/reflect/reflect.go b/reflect/reflect.go
index 2baa4b3..f5ffc1e 100644
--- a/reflect/reflect.go
+++ b/reflect/reflect.go
@@ -48,10 +48,11 @@ import (
)
var (
- cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")
- printf = flag.Bool("print", false, "print replies")
View reuseport.diff
diff --git a/server.go b/server.go
index 685753f..cdf140c 100644
--- a/server.go
+++ b/server.go
@@ -10,6 +10,8 @@ import (
"net"
"sync"
"time"
+
+ "github.com/libp2p/go-reuseport"
View force_rd.diff
diff --git a/dohproxy/httpproxy.py b/dohproxy/httpproxy.py
index 66d1feb..750618c 100755
--- a/dohproxy/httpproxy.py
+++ b/dohproxy/httpproxy.py
@@ -65,6 +65,8 @@ class DOHApplication(aiohttp.web.Application):
async def resolve(self, request, dnsq):
qid = dnsq.id
+ # Force RD bit
+ dnsq.flags |= dns.flags.RD
View keybase.md

Keybase proof

I hereby claim:

  • I am chantra on github.
  • I am chantra (https://keybase.io/chantra) on keybase.
  • I have a public key ASBXkSxjMmfSJVkr9ZAcLqkXHptNFvEy11qkvlxAMWwAewo

To claim this, I am signing this object:

View aioh2_helper.diff
diff --git a/aioh2/helper.py b/aioh2/helper.py
index 345a4e7..3717931 100644
--- a/aioh2/helper.py
+++ b/aioh2/helper.py
@@ -25,19 +25,20 @@ def _split_kwargs(kwargs):
@asyncio.coroutine
-def open_connection(host=None, port=None, *, loop=None, **kwargs):
+def open_connection(host=None, port=None, *, cls=H2Protocol, loop=None,
View gist:e8bb09039579340b94036902e8a8a8d1
root@fc0d038d7823:/exabgp# ./sbin/exabgp -e /etc/exabgp/exabgp.env /etc/exabgp/exabgp.conf --debug
20:03:41 | 378 | welcome | Thank you for using ExaBGP
20:03:41 | 378 | version | 4.0.2-1c737d99
20:03:41 | 378 | interpreter | 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
20:03:41 | 378 | os | Linux fc0d038d7823 4.9.49-moby #1 SMP Fri Dec 8 13:40:02 UTC 2017 x86_64
20:03:41 | 378 | installation | /exabgp
20:03:41 | 378 | cli control | named pipes for the cli are:
20:03:41 | 378 | cli control | to send commands /run/exabgp/exabgp.in
20:03:41 | 378 | cli control | to read responses /run/exabgp/exabgp.out
20:03:41 | 378 | network | listening for BGP session(s) on 0.0.0.0:179
View exabgp.env
[exabgp.bgp]
openwait = 2
[exabgp.daemon]
drop = false
user = 'root'
[exabgp.tcp]
bind = '0.0.0.0'
View exabgp.conf
template {
neighbor all {
router-id 172.18.0.3;
local-as 65001;
hold-time 20;
capability {
graceful-restart;
}
}
}
View Dockerfile
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y dnsutils iputils-ping iproute2 tcpdump vim
RUN apt-get install -y python python3
RUN mkdir /etc/exabgp
COPY exabgp.env /etc/exabgp/exabgp.env
COPY exabgp.conf /etc/exabgp/exabgp.conf
RUN mkdir /var/run/exabgp
You can’t perform that action at this time.