http-tunnel-client/test/test.ts

35 lines
712 B
TypeScript
Raw Normal View History

2023-07-11 12:20:33 +07:00
import { startClient } from '../src/api';
async function main() {
const client = await startClient({
port: 3000,
options: {
profile: 'mytest',
},
});
2023-07-11 15:04:48 +07:00
console.log('Client started:', client?.getEndpoint());
2023-07-11 12:20:33 +07:00
setTimeout(async () => {
client?.stop();
}, 5000);
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
// import { createProxyServer } from './proxy';
// import { createProxyServer } from './proxy_tcp';
// const proxy = createProxyServer('https://git.cubetiqs.com', {
// proxyPort: 3005,
// basePath: '/',
// });
// const proxy = createProxyServer('192.168.0.202', 8081, {
// proxyPort: 3005,
// });