-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
Correct structure #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This structure won't work, since (as you can see in https://github.com/danog/MadelineProto/blob/master/src/danog/MadelineProto/MTProto.php#L25) connection now contains an array of datacenters, not just one.
I think we can only keep app_info, and inserting authorization with rsa_key would be also nice.
see in https://github.com/danog/MadelineProto/blob/master/src/danog/MadelineProto/MTProto.php#L88 |
I haven't updated that part of the code yet. |
For the following array 'connection' => [
'dc_list' => [
2 => [
'ip_address' => '149.154.167.50',
'port' => '443',
'protocol' => 'tcp_full',
],
], The following code is correct $this->sock = new Connection($this->settings['connection']['dc_list'][2]['ip_address'], $this->settings['connection']['dc_list'][2]['port'], $this->settings['connection']['dc_list'][2]['protocol']); |
Yep. |
Yes, good idea |
I found the following IP address and port in webogram source var dcOptions = Config.Modes.test
? [
{id: 1, host: '149.154.175.10', port: 80},
{id: 2, host: '149.154.167.40', port: 80},
{id: 3, host: '149.154.175.117', port: 80}
]
: [
{id: 1, host: '149.154.175.50', port: 80},
{id: 2, host: '149.154.167.51', port: 80},
{id: 3, host: '149.154.175.100', port: 80},
{id: 4, host: '149.154.167.91', port: 80},
{id: 5, host: '149.154.171.5', port: 80}
] |
@2012mjm Yeah, we could create two subarrays in the connection subarray, testing and main, each with the correct dc_list to be selected by a test_mode boolean in the main array. |
No description provided.