<commit_before># node-tcp-relay [![Codacy Badge](https://api.codacy.com/project/badge/Grade/afcfc0a48b6b408c9c193fb72776c831)](https://www.codacy.com/app/tewarid/node-tcp-relay?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=tewarid/node-tcp-relay&amp;utm_campaign=Badge_Grade) [![Maintainability](https://api.codeclimate.com/v1/badges/4e63f2f80369103db673/maintainability)](https://codeclimate.com/github/tewarid/node-tcp-relay/maintainability)

This TCP relay/reverse proxy can be used to expose any TCP/IP service running behind a NAT. This includes services that use HTTP and SSH.

To install from  <a href="https://www.npmjs.com/package/node-tcp-relay">npm</a>
```bash
sudo npm install -g node-tcp-relay
```

## Command Line Interface

The relay server is meant to be executed on a server visible on the internet, as follows

```bash
tcprelays --relayPort 10080 --servicePort 10081 [--hostname [IP]] [--secret key] [--tls] [--pfx file] [--passphrase passphrase]
```

`relayPort` is the port where the relay server will listen for incoming connections from the relay client. `servicePort` is the port where internet clients can connect to the service exposed through the relay. Optionally, `hostname` specifies the IP address to listen at. Node.js listens on unspecified IPv6 address `::` by default.

`secret` specifies a shared secret key used to authorize relay client. `tls` option enables secure communication with relay client using TLS. `pfx` option specifies a private key file used to establish TLS. `passphrase` specifies password used to protect private key.

The relay client is meant to be executed on a machine behind a NAT, as follows

```bash
tcprelayc --host host --port 10080 --relayHost host --relayPort port [--numConn count] [--secret key] [--tls] [--rejectUnauthorized]
```

`host` is any server visible to the machine behind the NAT. `port` is the port of the service you want to expose through the relay.
<commit_msg>add build status<commit_after># node-tcp-relay [![Build Status](https://semaphoreci.com/api/v1/tewarid/node-tcp-relay/branches/master/badge.svg)](https://semaphoreci.com/tewarid/node-tcp-relay) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/afcfc0a48b6b408c9c193fb72776c831)](https://www.codacy.com/app/tewarid/node-tcp-relay?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=tewarid/node-tcp-relay&amp;utm_campaign=Badge_Grade) [![Maintainability](https://api.codeclimate.com/v1/badges/4e63f2f80369103db673/maintainability)](https://codeclimate.com/github/tewarid/node-tcp-relay/maintainability)

This TCP relay/reverse proxy can be used to expose any TCP/IP service running behind a NAT. This includes services that use HTTP and SSH.

To install from  <a href="https://www.npmjs.com/package/node-tcp-relay">npm</a>
```bash
sudo npm install -g node-tcp-relay
```

## Command Line Interface

The relay server is meant to be executed on a server visible on the internet, as follows

```bash
tcprelays --relayPort 10080 --servicePort 10081 [--hostname [IP]] [--secret key] [--tls] [--pfx file] [--passphrase passphrase]
```

`relayPort` is the port where the relay server will listen for incoming connections from the relay client. `servicePort` is the port where internet clients can connect to the service exposed through the relay. Optionally, `hostname` specifies the IP address to listen at. Node.js listens on unspecified IPv6 address `::` by default.

`secret` specifies a shared secret key used to authorize relay client. `tls` option enables secure communication with relay client using TLS. `pfx` option specifies a private key file used to establish TLS. `passphrase` specifies password used to protect private key.

The relay client is meant to be executed on a machine behind a NAT, as follows

```bash
tcprelayc --host host --port 10080 --relayHost host --relayPort port [--numConn count] [--secret key] [--tls] [--rejectUnauthorized]
```

`host` is any server visible to the machine behind the NAT. `port` is the port of the service you want to expose through the relay.

{'fraction_non_alphanumeric': 0.10939036381514258, 'fraction_numerical': 0.025319567354965586, 'mean_word_length': 4.854676258992805, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 12, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '33184', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1232, 'n_words': 448}