Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

x13a/dnsstamp-swift

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

dnsstamp-swift

DNSStamps implementation in swift.

Example

import DNSStamp

func main() throws {
    let str = "sdns://AAAAAAAAAAAAGltmZTgwOjo2ZDZkOmY3MmM6M2FkOjYwYjhd"
    
    let stamp = try DNSStamp.from(str).get()
    switch stamp {
    case .plainDns(let val):      assert(str == val.encode())
    case .dnsCrypt(let val):      assert(str == val.encode())
    case .doh(let val):           assert(str == val.encode())
    case .dot(let val):           assert(str == val.encode())
    case .doq(let val):           assert(str == val.encode())
    case .odohTarget(let val):    assert(str == val.encode())
    case .dnsCryptRelay(let val): assert(str == val.encode())
    case .odohRelay(let val):     assert(str == val.encode())
    }
}

main()

About

DNS stamps implementation in swift.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Languages