Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy not connecting to telnet #7

Open
pittbull opened this issue Aug 4, 2023 · 2 comments
Open

Proxy not connecting to telnet #7

pittbull opened this issue Aug 4, 2023 · 2 comments

Comments

@pittbull
Copy link

pittbull commented Aug 4, 2023

I stumbled upon your proxy and client and wanted to test it out for a mini mud project I'm running.

Got it all set up and the files configured, but I am unable to get the proxy to connect to the mud. Here's the config files:

wsproxy.js

let srv = {
  path: __dirname,
  /* this websocket proxy port */
  ws_port: 6200,
  /* default telnet host */
  tn_host: 'dikumud.<myhost>',
  /* default telnet/target port */
  tn_port: 4242,
  /* enable additional debugging */
  debug: true,
  /* use node zlib (different from mccp) - you want this turned off unless your server can't do MCCP and your client can inflate data */
  compress: true,
  /* set to false while server is shutting down */
  open: true,
  ttype: {
    enabled: 1,
    portal: ['maldorne.org', 'XTERM-256color', 'MTTS 141'],
  },
  gmcp: {
    enabled: 1,
    portal: ['client maldorne.org', 'client_version 1.0'],
  },

src/config.js

debug: param('debug') || 1,
host: param('host') || 'dikumud.<myhost>',
port: param('port') || '4242',
name: param('name') || 'House of PittBull',
...
proxy: 'wss://dikumud.<myhost>:6200/',

socket.js
var proxy = 'wss://dikumud.<myhost>:6200/';

I see the connection being established in the proxy console:

(node:462809) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
2023-08-04T10:32:44.442Z : (ws) server listening: port 6200
2023-08-04T10:32:48.484Z : (ws on connection) new connection
2023-08-04T10:32:48.484Z : (ws on connection) connection count: 1

But my website is just blank:
image

I am able to telnet to the mud from the container running the web-proxy-client.

Any insights?

@neverbot
Copy link
Member

neverbot commented Aug 7, 2023

I've checked my configuration and haven´t been able to find anything different, your config seems to be ok 🤔

In my case, I'm executing both the mud server and the proxy in the same machine, without using containers, I'm assuming your are using one container for the mud server and another for the proxy, could the problem be related to this? Maybe the proxy is not able to connect to a different container through the docker network?, even if you could telnet from one to the other. (I updated this code from an already existing project, don't know the inner workings in deep to be sure).

@emersonrp
Copy link

I'm having the same trouble - the client connects to the proxy, the proxy announces there's a new connection, but then black screen on the client and no further output for the proxy. No containers or anything are involved, the proxy and the MOO are processes running "bare-metal" on the same (vm) host.

Pertinent config:

wsproxy.js

   /* default telnet host */                                                                                          
   tn_host: 'hayseed.net',                                                                                            
   /* default telnet/target port */                                                                                   
   tn_port: 7777,

config.js

  host: param('host') || 'hayseed.net',                                                                                  
  port: param('port') || '7777',                                                                                         
  <snip>
  proxy: 'wss://hayseed.net:6200/',

socket.js

var proxy = 'wss://hayseed.net:6200/';

The rest is unchanged from default. Doing a telnet hayseed.net 7777 from the host connects to the MOO just fine, so the hostname is resolving to itself correctly.

Any thoughts? Not sure how to go about debugging this further. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants