1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

* first action! (#1)

This commit is contained in:
shimataro 2019-09-18 20:39:54 +09:00 committed by GitHub
parent 8deacc95b1
commit ace1e6a69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3750 changed files with 1155519 additions and 0 deletions

124
node_modules/https-proxy-agent/History.md generated vendored Normal file
View file

@ -0,0 +1,124 @@
2.2.0 / 2018-03-03
==================
* Add "engines" to package.json - requires Node.js >= 4.5.0
* Use `Buffer.from()`
2.1.1 / 2017-11-28
==================
* Update `debug` - Security Problems with Previous Version (#38)
2.1.0 / 2017-08-08
==================
* only include the port number in the Host header when non-default port (#22)
* set ALPN to "http 1.1" by default when using tlsproxy (#25)
* only set `ALPNProtocols` when the property does not already exist
* support SNI (#14)
2.0.0 / 2017-06-26
==================
* rename https-proxy-agent.js to index.js
* update dependencies and remove semver-specific test case
* update `agent-base` to v4
* remove `extend` dependency
* :arrow_up: update minimum version of debug dependency
* opts/options
* drop Node versions < v4 from Travis-CI
* test Node.js 5, 6, 7 and 8 on Travis-CI
* README: remove outdated `secureEndpoint` reference
* README: remove `secureEndpoint` docs, add `headers`
* https-proxy-agent: add support for proxy "headers"
1.0.0 / 2015-07-10
==================
* upgrade to "agent-base" v2 API
* test: test case is fixed
* use %o debug() formatter
* README: use SVG for Travis-CI badge
0.3.6 / 2015-07-06
==================
* package: update "extend" to v3
* package: update "mocha" to v2
* package: update "debug" to v2
* travis: test node v0.8, v0.10, and v0.12
* test: use ssl-cert-snakeoil self-signed SSL certs
0.3.5 / 2014-06-11
==================
* package: update "debug" to v1.0.0
0.3.4 / 2014-04-09
==================
* gitignore: ignore root level ?.js files
* package: update outdated dependencies
0.3.3 / 2014-01-13
==================
* https-proxy-agnet: use debug() instead of console.error()
* https-proxy-agent: fix debug() call
* History: fix whitespace
0.3.2 / 2013-11-18
==================
* https-proxy-agent: allow "https" without trailing colon
* README: fix typo
0.3.1 / 2013-11-16
==================
* test: enable the HTTPS over HTTPS test on node v0.11.8
* https-proxy-agent: create the proxy socket connection first
* https-proxy-agent: delete `pathname` from the proxy opts as well
* https-proxy-agent: remove dead "end"-emitting code
0.3.0 / 2013-09-16
==================
* https-proxy-agent: use "debug" module
* https-proxy-agent: update to the "agent-base" v1 API
* https-proxy-agent: default the "port" to 443 if not set
* https-proxy-agent: augment the `opts` object for the `tls.connect` function
* https-proxy-agent: use "extend" module
* https-proxy-agent: remove use of `this` as much as possible
* https-proxy-agent: listen for the "error" event of the socket
* test: refactor of tests to use "proxy" module
* test: add "error" event catching test
* test: add 407 proxy response test
* test: use "semver" module, disable the HTTPS over HTTPS test for node >= v0.11.3
0.2.0 / 2013-09-03
==================
* Add initial "Proxy-Authorization" Basic authentication support
0.1.0 / 2013-07-21
==================
* rename `secure` to `secureProxy`
* added `secureEndpoint` option
* various optimizations
* README improvements
0.0.2 / 2013-07-11
==================
* test: add mocha tests
* don't use `socket.ondata`, use the official API instead
* throw an Error when no proxy info is given
* add support for passing options to net/tls .connect()
0.0.1 / 2013-07-09
==================
* Initial release

137
node_modules/https-proxy-agent/README.md generated vendored Normal file
View file

@ -0,0 +1,137 @@
https-proxy-agent
================
### An HTTP(s) proxy `http.Agent` implementation for HTTPS
[![Build Status](https://travis-ci.org/TooTallNate/node-https-proxy-agent.svg?branch=master)](https://travis-ci.org/TooTallNate/node-https-proxy-agent)
This module provides an `http.Agent` implementation that connects to a specified
HTTP or HTTPS proxy server, and can be used with the built-in `https` module.
Specifically, this `Agent` implementation connects to an intermediary "proxy"
server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to
open a direct TCP connection to the destination server.
Since this agent implements the CONNECT HTTP method, it also works with other
protocols that use this method when connecting over proxies (i.e. WebSockets).
See the "Examples" section below for more.
Installation
------------
Install with `npm`:
``` bash
$ npm install https-proxy-agent
```
Examples
--------
#### `https` module example
``` js
var url = require('url');
var https = require('https');
var HttpsProxyAgent = require('https-proxy-agent');
// HTTP/HTTPS proxy to connect to
var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
console.log('using proxy server %j', proxy);
// HTTPS endpoint for the proxy to connect to
var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate';
console.log('attempting to GET %j', endpoint);
var options = url.parse(endpoint);
// create an instance of the `HttpsProxyAgent` class with the proxy server information
var agent = new HttpsProxyAgent(proxy);
options.agent = agent;
https.get(options, function (res) {
console.log('"response" event!', res.headers);
res.pipe(process.stdout);
});
```
#### `ws` WebSocket connection example
``` js
var url = require('url');
var WebSocket = require('ws');
var HttpsProxyAgent = require('https-proxy-agent');
// HTTP/HTTPS proxy to connect to
var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
console.log('using proxy server %j', proxy);
// WebSocket endpoint for the proxy to connect to
var endpoint = process.argv[2] || 'ws://echo.websocket.org';
var parsed = url.parse(endpoint);
console.log('attempting to connect to WebSocket %j', endpoint);
// create an instance of the `HttpsProxyAgent` class with the proxy server information
var options = url.parse(proxy);
var agent = new HttpsProxyAgent(options);
// finally, initiate the WebSocket connection
var socket = new WebSocket(endpoint, { agent: agent });
socket.on('open', function () {
console.log('"open" event!');
socket.send('hello world');
});
socket.on('message', function (data, flags) {
console.log('"message" event! %j %j', data, flags);
socket.close();
});
```
API
---
### new HttpsProxyAgent(Object options)
The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
The `options` argument may either be a string URI of the proxy server to use, or an
"options" object with more specific properties:
* `host` - String - Proxy host to connect to (may use `hostname` as well). Required.
* `port` - Number - Proxy port to connect to. Required.
* `secureProxy` - Boolean - If `true`, then use TLS to connect to the proxy. Defaults to `false`.
* `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method.
* Any other options given are passed to the `net.connect()`/`tls.connect()` functions.
License
-------
(The MIT License)
Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling

22
node_modules/https-proxy-agent/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,22 @@
declare module 'https-proxy-agent' {
import * as https from 'https'
namespace HttpsProxyAgent {
interface HttpsProxyAgentOptions {
host: string
port: number
secureProxy?: boolean
headers?: {
[key: string]: string
}
[key: string]: any
}
}
// HttpsProxyAgent doesnt *actually* extend https.Agent, but for my purposes I want it to pretend that it does
class HttpsProxyAgent extends https.Agent {
constructor(opts: HttpsProxyAgent.HttpsProxyAgentOptions | string)
}
export = HttpsProxyAgent
}

229
node_modules/https-proxy-agent/index.js generated vendored Normal file
View file

@ -0,0 +1,229 @@
/**
* Module dependencies.
*/
var net = require('net');
var tls = require('tls');
var url = require('url');
var Agent = require('agent-base');
var inherits = require('util').inherits;
var debug = require('debug')('https-proxy-agent');
/**
* Module exports.
*/
module.exports = HttpsProxyAgent;
/**
* The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to the
* specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
*
* @api public
*/
function HttpsProxyAgent(opts) {
if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts);
if ('string' == typeof opts) opts = url.parse(opts);
if (!opts)
throw new Error(
'an HTTP(S) proxy server `host` and `port` must be specified!'
);
debug('creating new HttpsProxyAgent instance: %o', opts);
Agent.call(this, opts);
var proxy = Object.assign({}, opts);
// if `true`, then connect to the proxy server over TLS. defaults to `false`.
this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
// prefer `hostname` over `host`, and set the `port` if needed
proxy.host = proxy.hostname || proxy.host;
proxy.port = +proxy.port || (this.secureProxy ? 443 : 80);
// ALPN is supported by Node.js >= v5.
// attempt to negotiate http/1.1 for proxy servers that support http/2
if (this.secureProxy && !('ALPNProtocols' in proxy)) {
proxy.ALPNProtocols = ['http 1.1']
}
if (proxy.host && proxy.path) {
// if both a `host` and `path` are specified then it's most likely the
// result of a `url.parse()` call... we need to remove the `path` portion so
// that `net.connect()` doesn't attempt to open that as a unix socket file.
delete proxy.path;
delete proxy.pathname;
}
this.proxy = proxy;
this.defaultPort = 443;
}
inherits(HttpsProxyAgent, Agent);
/**
* Called when the node-core HTTP client library is creating a new HTTP request.
*
* @api public
*/
HttpsProxyAgent.prototype.callback = function connect(req, opts, fn) {
var proxy = this.proxy;
// create a socket connection to the proxy server
var socket;
if (this.secureProxy) {
socket = tls.connect(proxy);
} else {
socket = net.connect(proxy);
}
// we need to buffer any HTTP traffic that happens with the proxy before we get
// the CONNECT response, so that if the response is anything other than an "200"
// response code, then we can re-play the "data" events on the socket once the
// HTTP parser is hooked up...
var buffers = [];
var buffersLength = 0;
function read() {
var b = socket.read();
if (b) ondata(b);
else socket.once('readable', read);
}
function cleanup() {
socket.removeListener('data', ondata);
socket.removeListener('end', onend);
socket.removeListener('error', onerror);
socket.removeListener('close', onclose);
socket.removeListener('readable', read);
}
function onclose(err) {
debug('onclose had error %o', err);
}
function onend() {
debug('onend');
}
function onerror(err) {
cleanup();
fn(err);
}
function ondata(b) {
buffers.push(b);
buffersLength += b.length;
var buffered = Buffer.concat(buffers, buffersLength);
var str = buffered.toString('ascii');
if (!~str.indexOf('\r\n\r\n')) {
// keep buffering
debug('have not received end of HTTP headers yet...');
if (socket.read) {
read();
} else {
socket.once('data', ondata);
}
return;
}
var firstLine = str.substring(0, str.indexOf('\r\n'));
var statusCode = +firstLine.split(' ')[1];
debug('got proxy server response: %o', firstLine);
if (200 == statusCode) {
// 200 Connected status code!
var sock = socket;
// nullify the buffered data since we won't be needing it
buffers = buffered = null;
if (opts.secureEndpoint) {
// since the proxy is connecting to an SSL server, we have
// to upgrade this socket connection to an SSL connection
debug(
'upgrading proxy-connected socket to TLS connection: %o',
opts.host
);
opts.socket = socket;
opts.servername = opts.servername || opts.host;
opts.host = null;
opts.hostname = null;
opts.port = null;
sock = tls.connect(opts);
}
cleanup();
fn(null, sock);
} else {
// some other status code that's not 200... need to re-play the HTTP header
// "data" events onto the socket once the HTTP machinery is attached so that
// the user can parse and handle the error status code
cleanup();
// save a reference to the concat'd Buffer for the `onsocket` callback
buffers = buffered;
// need to wait for the "socket" event to re-play the "data" events
req.once('socket', onsocket);
fn(null, socket);
}
}
function onsocket(socket) {
// replay the "buffers" Buffer onto the `socket`, since at this point
// the HTTP module machinery has been hooked up for the user
if ('function' == typeof socket.ondata) {
// node <= v0.11.3, the `ondata` function is set on the socket
socket.ondata(buffers, 0, buffers.length);
} else if (socket.listeners('data').length > 0) {
// node > v0.11.3, the "data" event is listened for directly
socket.emit('data', buffers);
} else {
// never?
throw new Error('should not happen...');
}
// nullify the cached Buffer instance
buffers = null;
}
socket.on('error', onerror);
socket.on('close', onclose);
socket.on('end', onend);
if (socket.read) {
read();
} else {
socket.once('data', ondata);
}
var hostname = opts.host + ':' + opts.port;
var msg = 'CONNECT ' + hostname + ' HTTP/1.1\r\n';
var headers = Object.assign({}, proxy.headers);
if (proxy.auth) {
headers['Proxy-Authorization'] =
'Basic ' + Buffer.from(proxy.auth).toString('base64');
}
// the Host header should only include the port
// number when it is a non-standard port
var host = opts.host;
if (!isDefaultPort(opts.port, opts.secureEndpoint)) {
host += ':' + opts.port;
}
headers['Host'] = host;
headers['Connection'] = 'close';
Object.keys(headers).forEach(function(name) {
msg += name + ': ' + headers[name] + '\r\n';
});
socket.write(msg + '\r\n');
};
function isDefaultPort(port, secure) {
return Boolean((!secure && port === 80) || (secure && port === 443));
}

66
node_modules/https-proxy-agent/package.json generated vendored Normal file
View file

@ -0,0 +1,66 @@
{
"_from": "https-proxy-agent@^2.2.1",
"_id": "https-proxy-agent@2.2.2",
"_inBundle": false,
"_integrity": "sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg==",
"_location": "/https-proxy-agent",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "https-proxy-agent@^2.2.1",
"name": "https-proxy-agent",
"escapedName": "https-proxy-agent",
"rawSpec": "^2.2.1",
"saveSpec": null,
"fetchSpec": "^2.2.1"
},
"_requiredBy": [
"/make-fetch-happen"
],
"_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz",
"_shasum": "271ea8e90f836ac9f119daccd39c19ff7dfb0793",
"_spec": "https-proxy-agent@^2.2.1",
"_where": "/home/shimataro/projects/actions/ssh-key-action/node_modules/make-fetch-happen",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
"url": "http://n8.io/"
},
"bugs": {
"url": "https://github.com/TooTallNate/node-https-proxy-agent/issues"
},
"bundleDependencies": false,
"dependencies": {
"agent-base": "^4.3.0",
"debug": "^3.1.0"
},
"deprecated": false,
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
"devDependencies": {
"mocha": "^3.4.2",
"proxy": "^0.2.4"
},
"engines": {
"node": ">= 4.5.0"
},
"homepage": "https://github.com/TooTallNate/node-https-proxy-agent#readme",
"keywords": [
"https",
"proxy",
"endpoint",
"agent"
],
"license": "MIT",
"main": "./index.js",
"name": "https-proxy-agent",
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-https-proxy-agent.git"
},
"scripts": {
"test": "mocha --reporter spec"
},
"types": "./index.d.ts",
"version": "2.2.2"
}