![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
udp-director
Advanced tools
A tool that is capable of directing UDP traffic from a specific port to as many hosts as needed.
A tool that is capable of redirecting UDP traffic from a specific port to as many hosts as needed.
udp-director was born with the idea that it might be necessary to replicate UDP traffic to multiple different potential hosts on systems like kubernetes where ingress controllers can help route things automagically. The concept is simple: udp-director can listen on a port and play the "middle man" for all UDP traffic.
You can use it as a command line tool to do the grunt work for you without writing a single line of code OR you can use this as a regular node package if you're trying to achieve something a little more custom.
To use udp-director as a command line tool, perform the following command on a machine that has node
and npm
installed on it:
npm install udp-director -g
.
After doing so, you can browse the cli tool help by performing udp-director --help
.
There are 2 ways you can start directing your UDP traffic via the CLI tool: (1) by specifying the configuration directly with the command or (2) loading a configuration via a JSON file.
To specify the configuration directly, you could use something like:
udp-director -c ~/my-director-config.json
This will tell udp-director to look for a configuration file called my-director-config.json
in your user's home directory.
For an example of the JSON structure you can use in this file, check out the example configuration.
To load a configuration directly into the command line tool, you can run something like this:
udp-director 1337=192.168.1.1:20000,192.168.1.2:20000
The command above will instruct udp-director to listen for traffic on port 1337 and direct it to both "receivers" at 192.168.1.1 and 192.168.1.2 on port 20000.
Here's another example that involves a few ports to listen on:
udp-director 1337=192.168.1.1 2000=192.168.1.2:9000,192.168.1.3:9001
The command above sets up 2 directors: (1) listens at port 1337 for incoming traffic and sends it to 192.168.1.1 on port 80 (since no port was specified, 80 is the default) and (2) listens for incoming traffic on port 2000 and directs it to both "receivers" at 192.168.1.2 (port 9000) and 192.168.1.3 (port 9001).
To include udp-director in your node.js application, run the following command:
npm install udp-director --save
To use this package in your node.js application, you can do something like this:
// external dependencies
const Director = require('udp-director');
// setup some variables to make life easier
const portToListenOn = 1337;
const myArrayOfReceivers = [
{
host: '192.168.1.1',
port: 20000
}, {
host: '192.168.1.2',
port: 20000
}
];
// start directing UDP traffic
var myDirector = new Director(portToListenOn, myArrayOfReceivers);
The code above will setup a director on port 1337 to send traffic to both receivers at 192.168.1.1 and 192.168.1.2 on port 20000.
Easy enough, right?
You can pass custom settings to a director by performing something like:
var myDirector = new Director(portToListenOn, myArrayOfReceivers, mySettings);
Currently, the only custom settings supported by directors are:
noActivityTimeLimit
- If a UDP client hasn't set any packets to the server in this amount of time, the director will remove the client from cache and directing traffic to/from it. The current default for this setting is 30000
.Currently, the only public API method(s) that are available on a Director object are:
director.destroy()
- Destroy the director by removing the UDP server and all UDP clients setup for each receiver.If you'd like to run udp-director inside a docker container, checkout the official Docker Hub repository.
The MIT License (MIT)
Copyright (c) 2016-2017 Carl Danley
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A tool that is capable of directing UDP traffic from a specific port to as many hosts as needed.
The npm package udp-director receives a total of 0 weekly downloads. As such, udp-director popularity was classified as not popular.
We found that udp-director demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.