A simple tcp package forwarder example using CocoaAsyncSocket. Help you to get konwn about the data flow though the specify port.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Swift 4.2
YCPortForwarder is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'YCPortForwarder'
fordwarder = YCPortForwarder(remoteHost: "192.168.1.1", remotePort: 22, toPort: 8888)
if let localPort = fordwarder?.start() {
print("127.0.0.1:\(localPort) <===> 192.168.1.1:22")
}
- UDP support
- Objc support
yicheng,[email protected]
YCPortForwarder is available under the MIT license. See the LICENSE file for more info.