UNPKG

1.03 kBJavaScriptView Raw
1'use strict';
2
3const child = require('child_process');
4const path = require('path');
5const cli = require('heroku-cli-util');
6const exec = require('heroku-exec-util');
7const https = require('https')
8const http = require('http')
9const fs = require('fs')
10const co = require('co');
11
12module.exports = function(topic, command) {
13 return {
14 topic: topic,
15 command: command,
16 description: 'Launch a SOCKS proxy into a dyno',
17 help: `Example:
18
19 $ heroku ps:socks --app murmuring-headland-14719
20 Establishing credentials... done
21 SOCKSv5 proxy server started on port 1080
22 Use CTRL+C to stop the proxy`,
23 args: [],
24 flags: [{ name: 'dyno', char: 'd', hasValue: true, description: 'specify the dyno to connect to' }],
25 needsApp: true,
26 needsAuth: true,
27 run: cli.command(co.wrap(run))
28 }
29};
30
31function * run(context, heroku) {
32 yield exec.initFeature(context, heroku, function *(configVars) {
33 yield exec.createSocksProxy(context, heroku, configVars)
34 });
35 return new Promise(resolve => {})
36}