Comments (4)
^
from node-dns.
:)
from node-dns.
This is very simple :)
First look for structur: https://www.dynu.com/Resources/DNS-Records/SRV-Record
Extend DnsAnswer and add the fields, any field have a seperator:
interface DnsAnswerSRV extends DnsAnswer {
priority: number;
weight: number;
port: number;
target_host: string;
}
Now you can send:
const response = DNS.Packet.createResponseFromRequest(request);
....
response.answers.push({
name: '_sip._udp.example.com',
type: DNS.Packet.TYPE.SRV,
class: DNS.Packet.CLASS.IN,
ttl: 3600,
priority: 10,
weight: 5,
port: 5060,
target_host: 'siphost.com'
} as DnsAnswerSRV);
...
send(response);
I hope it help! I use it by my project: https://github.com/stefanwerfling/flyingfish/blob/main/backend/src/inc/Dns/Dns2Server.ts#L129
from node-dns.
Thanks.
from node-dns.
Related Issues (20)
- Force IPv4 HOT 1
- How to send NX Domain HOT 1
- Requester's IP HOT 5
- The idea of rate limiting HOT 1
- Bad Typescript usage HOT 1
- Hi there, trying to get NS entries to work... HOT 1
- GeoDNS HOT 2
- UDP Server Type should be configurable (udp4 or udp6) HOT 3
- use for DNS01 challenges? HOT 2
- malformed ipv6 HOT 2
- Server stopping instantly? HOT 1
- server sends response only when closing server HOT 1
- Max RPS
- Get SOA records
- Wrong response formatting for type AAAA HOT 4
- Intermittent long pauses when running as server
- Proxy protocol support
- EDNS Client Subnet (ECS) does not work with `resolve`
- DoH (wireformat) throws exception when decoding HTTP request body
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-dns.