clash-redirect

node v14.17.6
version: 3.0.0
endpointsharetweet
let express = require("express") let app = express() app.get('/', (req, res) => { res.end('It worked!') }) app.get('/redirect', (req, res) => { let q = req.query.q if(!q) res.status(404).end('请提供一个Clash订阅') let encodedUrl = encodeURIComponent(q) res.redirect(302, 'clash://install-config?url=' + encodedUrl) }) app.listen(3000)
Loading…

no comments

    sign in to comment