Skip to content

Example: HEP Relay

Lorenzo Mangani edited this page Mar 31, 2022 · 7 revisions

HEP Relay

Pastash can be leveraged as a simple stateless HEP UDP/TCP Forwarded and Multi-Plexer.

Installation

# sudo npm install -g @pastash/pastash

Recipes

Raw Forwarding

UDP Forwarder
input {
  udp {
    host => 127.0.0.1
    port => 9060
  }
}

output {
  udp {
    host => 10.0.0.1
    port => 9060
  }
  udp {
    host => 10.0.0.2
    port => 9061
  }
}
TCP Forwarder
input {
  tcp {
    host => 127.0.0.1
    port => 9060
  }
}

output {
  tcp {
    host => 10.0.0.1
    port => 9060
  }
  tcp {
    host => 10.0.0.2
    port => 9061
  }
}
Hybrid Forwarder
input {
  udp {
    host => 127.0.0.1
    port => 9060
  }
}

output {
  udp {
    host => 10.0.0.1
    port => 9060
  }
  tcp {
    host => 10.0.0.2
    port => 9061
  }
}

Queue Forwarder

Install the AMQP plugins for @pastash/pastash before proceeding

sudo npm install -g @pastash/output_amqp @pastash/input_amqp
Sender

Setup Sender to receive HEP/UDP and ship to AMQP

input {
  udp {
    host => 127.0.0.1
    port => 9060
  }
}

output {
  amqp {
    host => amqp_server
    port => 5672
    exchange_name => pastash
    topic => hep
  }
}
Receiver

Setup Receiver to receive AMQP and ship HEP/UDP

input {
  amqp {
    host => amqp_server
    port => 5672
    exchange_name => pastash
    topic => hep
  }
}

output {
  udp {
    host => hep_server
    port => 9060
  }
}
Clone this wiki locally