This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test commands for null byte behavior across shells | |
# Lines starting with # are comments and will be ignored | |
# Empty lines are also ignored | |
# Basic printf tests - these should work identically | |
printf "hello" | |
printf "before\\x00after" | |
printf "before\\000after" | |
printf "test\\x00" | |
printf "\\x00test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"os" | |
"os/exec" | |
"sort" | |
"strings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Test script to understand null byte behavior across different shell constructs | |
# Run this with different shells: bash, zsh, dash, etc. | |
echo "=== Shell: $0 ===" | |
echo "Shell version info:" | |
if command -v bash >/dev/null 2>&1; then | |
bash --version | head -1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func checksumNoFoldTwoAccum(b []byte, initial uint64) uint64 { | |
ac := initial | |
var bc, bcarr uint64 | |
var carry uint64 | |
for len(b) >= 128 { | |
// add in chunks of eight up to 128 | |
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[:8]), carry) | |
bc, bcarr = bits.Add64(bc, binary.BigEndian.Uint64(b[8:16]), bcarr) | |
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[16:24]), carry) | |
bc, bcarr = bits.Add64(bc, binary.BigEndian.Uint64(b[24:32]), bcarr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func checksumNoFoldBy8s(b []byte, initial uint64) uint64 { | |
ac := initial | |
var carry uint64 | |
for len(b) >= 128 { | |
// add in chunks of eight up to 128 | |
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[:8]), carry) | |
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[8:16]), carry) | |
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[16:24]), carry) | |
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[24:32]), carry) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
// Start Tailscale. | |
tssrv := &tsnet.Server{ | |
// Silence logs completely. | |
// They're really verbose, and we don't have anywhere good to put them. | |
// This will leave us blind if/when we have Tailscale-specific issues, | |
// but in that case, we'll restore the logs temporarily to debug. | |
Logf: func(string, ...any) {}, | |
Store: &tsDBStateStore{Q: srv.DB.Q}, | |
AuthKey: os.Getenv("TS_AUTHKEY"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package p | |
type T struct { | |
F float64 | |
} | |
var A = [100000]*T{ | |
2: TAKMS, | |
6: TAKGD, | |
7: TAKMS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
as a theme hint, could squeeze TRAFFIC into the fill, with all its letters circled, for "traffic circle" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/device/device.go b/device/device.go | |
index 5644c8a..db017b6 100644 | |
--- a/device/device.go | |
+++ b/device/device.go | |
@@ -44,6 +44,7 @@ type Device struct { | |
netlinkCancel *rwcancel.RWCancel | |
port uint16 // listening port | |
fwmark uint32 // mark value (0 = disabled) | |
+ brokenRoaming AtomicBool | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"strings" | |
"github.com/goccy/go-graphviz" | |
"github.com/goccy/go-graphviz/cgraph" | |
"github.com/tailscale/hujson" |
NewerOlder