EvilFreelancer / routeros-api-php

Mikrotik RouterOS API PHP client for your applications
https://mikrotik.com/software
MIT License
396 stars 146 forks source link

/ip/firewall/mangle/add not available #80

Closed wartw closed 2 years ago

wartw commented 2 years ago

PHP Fatal error: Uncaught RouterOS\Exceptions\QueryException: Specified endpoint is incorrect in /root/vendor/evilfreelancer/routeros-api-php/src/Query.php:75 Stack trace:

0 /root/vendor/evilfreelancer/routeros-api-php/src/Client.php(125): RouterOS\Query->__construct()

1 /root/chr.php(57): RouterOS\Client->query()

2 {main}

thrown in /root/vendor/evilfreelancer/routeros-api-php/src/Query.php on line 75

Fatal error: Uncaught RouterOS\Exceptions\QueryException: Specified endpoint is incorrect in /root/vendor/evilfreelancer/routeros-api-php/src/Query.php:75 Stack trace:

0 /root/vendor/evilfreelancer/routeros-api-php/src/Client.php(125): RouterOS\Query->__construct()

1 /root/chr.php(57): RouterOS\Client->query()

2 {main}

thrown in /root/vendor/evilfreelancer/routeros-api-php/src/Query.php on line 75

$ip_firewall_mangle_add =(new Query('/ip/firewall/mangle/add')) ->equal('action', 'mark-connection')->equal('chain', 'prerouting') ->equal('in-interface', 'pppoe_'.$ip)->equal('new-connection-mark', 'mark_'.$ip) ->equal('connection-mark', 'no-mark')->equal('passthrough', 'yes'); $ip_firewall_mangle_add1 = $client->query($interface_pppoe_client_add)->read();