File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -377,14 +377,16 @@ class OpenVPNClientExport extends Model {
377377 * @return array the proxy configuration array expected by pfSense functions
378378 */
379379 private function __get_proxy_config (): array {
380- return [
381- 'ip ' => $ this ->proxyaddr ->value ,
382- 'port ' => $ this ->proxyport ->value ,
383- 'user ' => $ this ->proxyuser ->value ,
384- 'password ' => $ this ->proxypass ->value ,
385- 'proxy_type ' => $ this ->useproxytype ->value ,
386- 'proxy_authtype ' => $ this ->useproxypass ->value ,
387- ];
380+ return $ this ->useproxy ->value
381+ ? [
382+ 'ip ' => $ this ->proxyaddr ->value ,
383+ 'port ' => $ this ->proxyport ->value ,
384+ 'user ' => $ this ->proxyuser ->value ,
385+ 'password ' => $ this ->proxypass ->value ,
386+ 'proxy_type ' => $ this ->useproxytype ->value ,
387+ 'proxy_authtype ' => $ this ->useproxypass ->value ,
388+ ]
389+ : [];
388390 }
389391
390392 private function __get_export_filename (): string {
You can’t perform that action at this time.
0 commit comments