Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lanmower authored Apr 29, 2024
1 parent c335c72 commit b976de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const relay = async () => {
const server = node.createServer({ reusableSocket: true });
server.on("connection", function (servsock) {
console.log('new connection, relaying to ' + port)
var socket = net.connect({port, host, allowHalfOpen: true })
var socket = net.connect({port, host })
let open = { local:true, remote:true }
socket.on('data', (d)=>{servsock.write(d)})
servsock.on('data', (d)=>{socket.write(d)})
Expand All @@ -41,7 +41,7 @@ const relay = async () => {
server.listen(keyPair);
},
client: async (publicKey, port) => {
var server = net.createServer({allowHalfOpen: true},function (local) {
var server = net.createServer({},function (local) {
console.log('connecting to tcp ', port);
const socket = node.connect(publicKey, { reusableSocket: true });
let open = { local:true, remote:true };
Expand Down

0 comments on commit b976de3

Please sign in to comment.