This project is currently being refactored by Nesto.
If you want to participate, feel free to reach out!
For more information, please visit the original README.
Martin Löper <[email protected]>
Variant | Status |
---|---|
Software | ⚙️ |
Hardware | ✔️ |
The hardware variant runs without any known issues.
We are currently not actively developing the software variant.
Thus, special hardware which leverages port mirroring is a prerequisite.
Conceptually, the software variant could be implemented using ip forwarding in the Linux kernel, setting up some iptables rules and capturing the packets using this codebase.
We use the TL-SG105E V4 for the reference design of our hardware variant. The larger TL-SG108E V6 works as well.
Make sure to use a separate ethernet port for the capturing interface (eth-proxy) and the interface with internet & LAN access (eth0). Since the Raspberry Pi 4B has one ethernet interface only, an additional one is needed. We tested the Rankie USB Network Adapter in this scenario and it appears to work just fine.
You have to set up port mirroring using the TL-SG105E's manual. The switch is reachable via http://192.168.0.1 (user=pw=admin) by default.
Forward traffic from the POS system's port AND/OR the printer's port to the pi's eth-proxy port.
Method | Command |
---|---|
curl | bash -c "$(curl -fsSL https://raw.githubusercontent.com/nesto-software/EthernetProxy/master/scripts/install-from-release.sh)" |
wget | bash -c "$(wget -O- https://raw.githubusercontent.com/nesto-software/EthernetProxy/master/scripts/install-from-release.sh)" |
# 1.) make sure to name the eth-proxy interface correctly, e.g. use ./etc/systemd/network/89-nesto-external-eth.link
# 2.) make sure to bring up the eth-proxy interface, e.g. use ./etc/network/interfaces OR manually using `sudo ifconfig eth-proxy up`
# 3.) start the ethernet proxy binary - you must be root to open the interface in promiscuous mode
sudo DEVICE="eth-proxy" EXPRESSION="tcp and dst port 9100" ethernet-proxy
We provided a sample application for Node.js in the ./nodejs-client folder.
- Start ethernet-proxy as described above in the usage section
- Install Node.js binary from nodejs.org or via nvm.
- Install Node.js dependencies:
cd nodejs-client
npm install
node ./nodejs-client/index.js