Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NewJhez01/gdns
/ functions
Functions
56 in github.com/NewJhez01/gdns
⨍
Functions
56
◇
Types & classes
15
↓ 11 callers
Method
Parse
(b []byte)
internal/dns/parser/parser.go:19
↓ 10 callers
Function
CreateHeaders
()
internal/dns/parser/header_parser.go:52
↓ 6 callers
Function
NewAnswer
()
internal/dns/parser/answer_parser.go:18
↓ 4 callers
Method
BuildNxDomainResp
()
internal/dns/parser/response.go:27
↓ 4 callers
Method
ParseAnswer
(b []byte, questionLen int)
internal/dns/parser/answer_parser.go:22
↓ 3 callers
Function
CreateQuestion
()
internal/dns/parser/question_parser.go:23
↓ 3 callers
Method
ParseName
(b []byte, cursor, depth int)
internal/dns/parser/answer_parser.go:77
↓ 3 callers
Method
ParseQuestion
(b []byte)
internal/dns/parser/question_parser.go:27
↓ 2 callers
Function
BuildResponse
(d Dns, rData []byte, ttl uint32)
internal/dns/parser/response.go:8
↓ 2 callers
Function
CountNameLen
(b []byte, consumed int)
internal/dns/parser/answer_parser.go:43
↓ 2 callers
Function
CreateNewDbConn
(path string)
internal/blocklist/blocklist_repo.go:19
↓ 2 callers
Function
CreateNewDnsStruct
()
internal/dns/parser/parser.go:13
↓ 2 callers
Function
CreateNewRedisClient
(c *redis.Client)
internal/cache/cache_repo.go:16
↓ 2 callers
Method
Migrate
(ctx context.Context)
internal/blocklist/blocklist_repo.go:48
↓ 2 callers
Function
NewServer
(redisClient cache.RedisClient, b blocklist.SqliteClient)
cmd/server/udp_server.go:24
↓ 2 callers
Method
SetDomainName
(ctx context.Context, key string, v Value, ttl time.Duration)
internal/cache/cache.go:19
↓ 2 callers
Method
Start
()
cmd/server/udp_server.go:34
↓ 2 callers
Method
Stop
()
cmd/server/udp_server.go:49
↓ 2 callers
Method
marshall
()
internal/dns/parser/marshall.go:9
↓ 1 callers
Method
GetDomainNameFromCache
(ctx context.Context, key string)
internal/cache/cache.go:18
↓ 1 callers
Method
IsBlocked
(key string, ctx context.Context)
internal/blocklist/blocklist.go:6
↓ 1 callers
Function
Resolve
(b []byte, c cache.Cache, bl blocklist.Blocklist)
internal/dns/resolver.go:13
↓ 1 callers
Method
appendDomain
(b []byte)
internal/dns/parser/answer_parser.go:108
↓ 1 callers
Function
closeConn
(f *os.File)
internal/blocklist/blocklist_repo.go:108
↓ 1 callers
Function
closeStmt
(s *sql.Stmt)
internal/blocklist/blocklist_repo.go:114
↓ 1 callers
Function
createDefaultAnswer
(rData []byte, ttl uint32)
internal/dns/parser/response.go:37
↓ 1 callers
Function
forwardToUpstream
(query []byte, questionLen int)
internal/dns/upstream_resolver.go:11
↓ 1 callers
Function
handleDns
(buff []byte, s string, bl blocklist.Blocklist, c cache.Cache, d *parser.Dns)
internal/dns/resolver.go:32
↓ 1 callers
Method
listen
()
cmd/server/udp_server.go:57
↓ 1 callers
Method
parseAfterAnswer
(b []byte)
internal/dns/parser/answer_parser.go:61
↓ 1 callers
Method
parseMisc
(b []byte)
internal/dns/parser/header_parser.go:67
↓ 1 callers
Method
parseStruct
(b []byte, s state)
internal/dns/parser/question_parser.go:45
↓ 1 callers
Function
setupResolver
(t *testing.T)
test/integration/integration_test.go:17
Function
FuzzDnsParse
(f *testing.F)
test/fuzz/fuzz_parser_test.go:9
Function
FuzzParseAnswer
(f *testing.F)
test/fuzz/fuzz_parser_test.go:29
Method
GetDomainNameFromCache
(ctx context.Context, key string)
internal/cache/cache_repo.go:22
Method
IsBlocked
(key string, ctx context.Context)
internal/blocklist/blocklist_repo.go:31
Method
Parse
(buff [12]byte)
internal/dns/parser/header_parser.go:56
Method
SetDomainName
(ctx context.Context, key string, val Value, ttl time.Duration)
internal/cache/cache_repo.go:39
Function
TestCountNameLen
(t *testing.T)
test/unit/answer_parser_test.go:12
Function
TestCreateQuestionSection1
(t *testing.T)
test/unit/question_parser_test.go:10
Function
TestNxDomainParser
(t *testing.T)
test/unit/nxdomain_test.go:10
Function
TestNxDomainParser_LabelTooLong
(t *testing.T)
test/unit/nxdomain_test.go:44
Function
TestParseAnswer
(t *testing.T)
test/unit/answer_parser_test.go:95
Function
TestParseName
(t *testing.T)
test/unit/answer_parser_test.go:46
Function
TestParser_InverseQuery
(t *testing.T)
test/unit/header_parser_test.go:54
Function
TestParser_MaxCounts
(t *testing.T)
test/unit/header_parser_test.go:127
Function
TestParser_RealWorldGoogleDNS
(t *testing.T)
test/unit/header_parser_test.go:171
Function
TestParser_ResponseWithAllFlags
(t *testing.T)
test/unit/header_parser_test.go:32
Function
TestParser_ResponseWithNXDOMAIN
(t *testing.T)
test/unit/header_parser_test.go:193
Function
TestParser_ServerStatus
(t *testing.T)
test/unit/header_parser_test.go:76
Function
TestParser_StandardQuery
(t *testing.T)
test/unit/header_parser_test.go:10
Function
TestParser_VariousRCodes
(t *testing.T)
test/unit/header_parser_test.go:98
Function
TestParser_ZeroBuffer
(t *testing.T)
test/unit/header_parser_test.go:149
Function
TestResolver
(t *testing.T)
test/integration/integration_test.go:73
Function
main
()
cmd/main.go:17