feat: init commit

This commit is contained in:
2021-05-08 00:42:40 +08:00
parent 8d196e48d0
commit 54297fbaa8
7 changed files with 81 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import 'dart:convert';
import 'dart:io';
import 'config.dart';
void main(List<String> arguments) {
final listenAddress = "127.0.0.1";
final listenPort = 8801;
final targetHost = "";
final targetPort = 443;
// TODO ...
print('Hello world!');
}
void startListen(HostAndPort listen, HostAndPort target) {
ServerSocket.bind(listen.host, listen.port).then((serverSocket) {
Socket.connect(target.host, target.port).then((clientSocket) {
// TODO ...
});
// serverSocket.listen((event) { })
});
}