Code Monkey home page Code Monkey logo

vpn-as-a-service's Introduction

vpn-as-a-service

Using APIv2

API: https://api.atspeeds.com/v2/:endpoint

Endpoint vpn user

  • POST /v2/sendsmscode?apikey=<apikey>: Send SMS verification code

    Name Type Description
    countryCode string The phone's country code.
    phoneNumber string The phone number to send the verification code.
    domain String Domain name

    Example of Request body json

    {
      "countryCode": "86",
      "phoneNumber": "13600000000",
      "domain": "33vpn.com",
    }
  • POST /v2/signup?apikey=<apikey>: User Signup

    Name Type Description
    countryCode string The phone's country code.
    phoneNumber string The phone number to send the verification code.
    userPass BASE64 Password for customer login
    domain String Domain name
    verificationCode String The verification code from the user that is being validated.

    Please approach administrator for apikey

    Example of Request body JSON

    {
     "countryCode": "86",
     "phoneNumber": "13600000000",
    "userPass": "c3RhY2thYnVzZS5jb20=",
     "domain": "33vpn.com",
    "verificationCode": "668688"
    }

    Example of Respons body

    {
     "credential": {
     	"domain": "33vpn.com",
     	"userId": "86136000000008",
     	"userPass": "c3RhY2thYnVzZS5jb20=",
     	"username": "8613600000008",
     	"password": "f2wq6A"
     },
     "results": "success"
    }
    Name Type Description
    results string success or failed
    userId string Username for customer login
    userPass BASE64 Password for customer login
    username string Username for vpn login
    password string Password for vpn login
  • POST /v2/login: User login

    Request Body

    Name Type Description
    userId string Username for customer login
    userPass BASE64 user Password in BASE64
    domain String Domain name

    Example of Request body JSON

       {
          "userId": "8613600000003",
          "userPass": "c3RhY2thYnVzZS5jb20=",
        "domain": "33vpn.com"
       }

    Example of Respons body

       {
              "result": "success",
              "credential": {
              "username": "8613600000008",
              "password": "f2wq6A",
              "active": 0,
              "protocol": "IKEv2",
              "vpn_remote_id": "vpn.atspeeds.com",
              "server_address_url": "https://api.atspeeds.com/servers"
               },
              "jwt":"<jwt_token>"
         }
    Name Type Description
    results string success or failed
    credential Object Object of user credential
    username string username for ikv2 vpn service
    password string password for ikv2 vpn service
    active Boolean user status for billing usage
    protocol String VPN protocol
    vpn_remote_id String VPN remote_id
    server_address_url URL A url to get the list of VPN servers
    JWT JWT token JWT token for further usage
  • GET /v2/servers: Return list of VPN servers

    Example response

    {
          "servers": [
              "hk.node.atspeeds.com",
          "jp.node.atspeeds.com"
              ]
    
    }
  • GET /v2/clients?jwt=<jwt_token>: GET client credential after login (with JWT token)

    JWT is generated in login. Example of Response

    {
            "result": "success",
             "credential": {
                "domain": "33vpn.com",
                "userId": "8613600000008",
                "username": "13600000008",
                "password": "f2wq6A",
                "active": 0,
                "protocol": "IKEv2",
                "vpn_remote_id": "vpn.atspeeds.com",
                "server_address_url": "https://api.atspeeds.com/servers"
               }
     }
  • PUT /v2/clients?jwt=<jwt_token>: Update user status and login password

    Example of Request body JSON

    {
           "userId": "8613600000003",
               "domain": "33vpn.com",
           "userPass": "<newpasswordinbase64>",
           "active": 1,
     }
    Name Value Description
    doamin string domain name (mandatory)
    userId string phone number (mandatory)
    userPass BASE64 user Password in BASE64 (semi-optional)
    active Boolean Billing status (semi-optional)

    Example of Response

       {
               "result": "success"
       }
  • delete /v2/clients?jwt=<jwt_token>: Delete VPN client by phone

    Example of Request body JSON

     {
           "userId": "8613600000003",
               "domain": "33vpn.com"
     }
    Name Value Description
    doamin string domain name (mandatory)
    userId string phone number (mandatory)

    Example of Response

    {
               "result": "success"
    }

vpn-as-a-service's People

Contributors

reggieyam998 avatar

Watchers

Reggie Yam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.