Skip to content

Commit 60aa5e6

Browse files
committed
Add proxy option to RemoteLRS
1 parent 3eba26f commit 60aa5e6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/RemoteLRS.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class RemoteLRS implements LRSInterface
3232
protected $endpoint;
3333
protected $version;
3434
protected $auth;
35+
protected $proxy;
3536
protected $extended;
3637

3738
public function __construct() {
@@ -100,6 +101,9 @@ protected function sendRequest($method, $resource) {
100101
if (isset($this->auth)) {
101102
array_push($http['header'], 'Authorization: ' . $this->auth);
102103
}
104+
if (isset($this->proxy)) {
105+
$http['proxy'] = $this->proxy;
106+
}
103107

104108
if (isset($options['headers'])) {
105109
foreach ($options['headers'] as $k => $v) {
@@ -1157,4 +1161,10 @@ public function setAuth() {
11571161
return $this;
11581162
}
11591163
public function getAuth() { return $this->auth; }
1164+
1165+
public function setProxy($value) {
1166+
$this->proxy = $value;
1167+
return $this;
1168+
}
1169+
public function getProxy() { return $this->proxy; }
11601170
}

0 commit comments

Comments
 (0)