master
cn.yimian.xyz 4 years ago
parent e9b1963d06
commit b98e77e641
  1. 15
      Dockerfile
  2. 11
      pm2.json
  3. 15
      src/index.js
  4. 0
      src/public/css/login.css
  5. 0
      src/public/img/login_background.png
  6. 0
      src/public/index.html
  7. 0
      src/public/js/login.js
  8. 0
      src/public/js/loginApp.js

@ -0,0 +1,15 @@
FROM keymetrics/pm2:latest-alpine
# Bundle APP files
COPY src src/
COPY package.json .
COPY pm2.json .
# Install app dependencies
ENV NPM_CONFIG_LOGLEVEL warn
RUN npm install --production
# Show current folder structure in logs
RUN ls -al -R
CMD [ "pm2-runtime", "start", "pm2.json" ]

@ -0,0 +1,11 @@
{
"name": "ushio-proxy",
"script": "src/index.js",
"instances": "1",
"env": {
"NODE_ENV": "development"
},
"env_production" : {
"NODE_ENV": "production"
}
}

@ -0,0 +1,15 @@
const express = require('express')
const request = require('request');
const app = express()
const port = 3000
app.listen(port, () => console.log(`Ushio-proxy listening at http://localhost:${port}`))
app.use(express.static(__dirname + '/public'));
app.get('/get/', (req, res) => {
if(req.query.hasOwnProperty('url')){
request(new Buffer(req.query.url, 'base64').toString()).pipe(res);
}
})

Before

Width:  |  Height:  |  Size: 490 KiB

After

Width:  |  Height:  |  Size: 490 KiB

Loading…
Cancel
Save