What are you trying to intercept? Your node express should not be a server, listening for requests. The requests are all sent to your server. Do you know your own IP and port? ? ?
const server = app.listen(3000, 'localhost', function () {
const host = server.address().address
const port = server.address().port
console.log("应用实例,访问地址为 http://%s:%s", host, port)
})
What are you trying to intercept? Your node express should not be a server, listening for requests. The requests are all sent to your server. Do you know your own IP and port? ? ?
The IP obtained above has been processed. You can get the IP regardless of whether you use a proxy or a direct connection.
Port. . . It seems I haven’t found a way