最简单的网关转发程序
- 监控端口2222,接收端口接到的数据
- 将数据从第四位开始截取
- 将数据转发到另外一台主机 本示例是 本机 192.168.35.1:3333
盗用同事梁某版权,
使用技术: springboot netty
git hub 地址 :
https://github.com/wei198621/GetwayForwardByNettyUdp
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.tiza.leo</groupId>
<artifactId>UdpGetwayForwardByNetty</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.tiza.leo.UdpGetwayForwardByNetty.Boot</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencyManagement>