Skip to content
A simple tcp package forwarder example using CocoaAsyncSocket.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
YCPortForwarder
.gitignore
LICENSE
README.md
YCPortForwarder.podspec
_Pods.xcodeproj

README.md

YCPortForwarder

Version License Platform

Features

A simple tcp package forwarder example using CocoaAsyncSocket. Help you to get konwn about the data flow though the specify port.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Swift 4.2

Installation

YCPortForwarder is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YCPortForwarder'

Forwarding With TCP

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")
}

TODO

  • UDP support
  • Objc support

Author

yicheng,yicheng.fzu@gmail.com

License

YCPortForwarder is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.