Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use ss.coffee #10

Open
mohamad77 opened this issue Mar 15, 2016 · 2 comments
Open

how to use ss.coffee #10

mohamad77 opened this issue Mar 15, 2016 · 2 comments

Comments

@mohamad77
Copy link

hi there,
I install shadowsocks-auth with this guide for server(not local)
https://github.com/Lupino/shadowsocks-auth
but server section is Unclear
how can i run redis-cli?! how can i use ss.coffee?! the guide for server is very Unclear!
(please answer in English.)
thanks

@Lupino
Copy link
Owner

Lupino commented Apr 14, 2016

sample use of ss.coffee

// install requirement
// npm install redis
var ss = require('ss');
// create a new user.
var user = {
  name: 'name',
  password: 'password',
  method: 'aes-128-cfb',
  limit: 1  1024  1024  1024
};

ss.set_user(user, function() {
   console.log('create user done');
});

@Lupino
Copy link
Owner

Lupino commented Apr 14, 2016

use redis-cli

# create a user called `lupino` with limit flow  1024 * 10 byte;
set ss:user:lupino  '{"name": "lupino", "password": "123456", "method": "aes-128-cfb", "limit": 10240 }'

# get user flow
get ss:flow:lupino

# other keys and is type
# ss:flow:lupino                    -- user info       set
# ss:flow:lupino:2016           -- year flow      sort set
# ss:flow:lupino:2016:04      -- month flow   sort set
# ss:flow:lupino:2016:04:14 -- day flow       sort set

then do youself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants