How can I internet accces via proxy with node-red on Ubuntu

#1

【environment】
CentOS7(Linux 3.10.0-826.11.6.el7.x86_64 x64 LE)
Node-RED version: v0.18.7
Node.js version:v6.14.3

setting
【Proxy】
telnet myproxy.local.co.jp 8080 and confirmed it
GET http://yahoo.co.jp/HTTP/1.1
I got HTM file

【OS】
I wrote /etc/environmen

I wrote /etc/systemd/system/node-red.service

Environment="http_proxy=http://myproxy.local.co.jp:8080"
Environment="https_proxy=http://myproxy.local.co.jp:8080"
Environment="HTTP_PROXY=http://myproxy.local.co.jp:8080"
Environment=HTTPS_PROXY="http://myproxy.local.co.jp:8080"

Blockquote

#2

Is there some wat to solve the error below

test1
connected "timestanp" and "http request" and "msg.payload" on the flow editor
and click button timestanp and got the output

2018.12.4. 11:04:48 node:c7730383.291e7
msg:error
"AssertionError:protokol mismatch"

test2
Set proxy to npm
After executing npm init at ~ / .node-red /, npm install was done
~ /. .node-red / node_modules is created, the request directory is created
I confirmed that request.js has been created

After adding the following to setting.js

【coding】

code
functionGlobalContxt: {
request: require (`/root/.node_modules/request/request.js'),
},

After typing systemctl restart node-red.service
I confirmed that the node-red flow editor can be displayed in the browser

Manually inject messages into flow timestamp node to function node
Connected and named proxy-use and described below

【code】
var request = context.grobal.request;
request ({'url': 'https://www.google.com/', 'proxy''http://myproxy.local.co.jp:8080/', function (error, response, body) {
if (! error && response.statusCode == 200) {
console.log (body);
}
});

【error】
When msg.payload was connected to the above function node and deployed, no error occurred

However, when injecting messages from timstanp, the following error occurs

2018/12/11 16:15:02 node: proxy-use
function: (error)
"TypeError: Can not set property
'domain' of undefined '

#3

I am sorry to have written down
"url" which exists in http-request is set with "test1"

#4
I amsorry to have writen down
【OS】
I wrote /etc/environmen
http_proxy="http://myproxy.local.co.jp:8080"
https_proxy="https://myproxy.local.co.jp:8080"