This NIP defines a standard for facilitating TCP requests over NOSTR relays to a specified destination. One basic implementation is currently available at [https://github.com/asmogo/nws](https://github.com/asmogo/nws).
While Nostr has been primarily focused on message-based communications, there is a growing need to extend its capabilities to support other types of network communication, such as TCP.
The motivation behind NWS is to leverage the existing Nostr infrastructure to facilitate TCP connections in a decentralized and privacy-preserving manner. By using Nostr relays as intermediaries, clients can establish connections to remote servers without needing direct access to their IP addresses, thereby reducing exposure to potential security risks and censorship.
### Terminology
*`client` - The entity initiating a TCP request over NOSTR.
*`exit-node` - The entity receiving a TCP request over NOSTR and forwarding it to the intended destination.
Unlike traditional TCP/IP communications that resolve a domain name to an IP address and establish a direct connection, NIP-74 leverages NOSTR relays as intermediate proxies for TCP communications.
The client must publish an encrypted event to the desired NOSTR public key, following the format outlined in the [Message Format] section.
Upon receiving the event, the exit node will process the request according to the specified message type, facilitating communication between the client and the destination.