Skip to content

It only connect with localhost #154

Description

@frodoe7

here's my codes

in localhost and it works well

const ib = require('ib');

    let client = new ib({ clientId : 1 , host : 'localhost' , port : 7497 });
    client.connect();
    client.on('connected' , () => {
        console.log("success");
    }).on("error" , () => {
        console.log("error");
    });

here , it's hosted in DigitalOcean server

const ib = require('ib');

    let client = new ib({ clientId : 1 , host : 'my public ip' , port : 7497 });
    client.connect();
    client.on('connected' , () => {
        console.log("success");
    }).on("error" , () => {
        console.log("error");
    });

it does not work in this case , my TWS are configured to receive from external IPs, not only the localhost (I also added my DigitalOcean server public ip to my TWS trusted IPs)

DigitalOcean blocks all the ports by default (except 80) , I also opened 7497
but still the same issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions