Coder Social home page Coder Social logo

v2raya-installer's Introduction

v2rayA Linux installer

Usage

Install v2rayA

Install with v2ray core:

sudo sh -c "$(wget -qO- https://github.com/v2rayA/v2rayA-installer/raw/main/installer.sh)" @ --with-v2ray

Install with xray core:

sudo sh -c "$(wget -qO- https://github.com/v2rayA/v2rayA-installer/raw/main/installer.sh)" @ --with-xray

Use curl -Ls to replace wget -qO- if you want to use curl instead of wget.

Remove v2rayA

sudo sh -c "$(wget -qO- https://github.com/v2rayA/v2rayA-installer/raw/main/uninstaller.sh)"

Service file

Systemd

See systemd

OpenRC

See openrc

Classic SysV

#!/bin/sh 
# chkconfig: 2345 99 01

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
v2rayA_bin=/usr/local/bin/v2raya
pid_file=/run/v2raya.pid

if [ ! -d "/tmp/v2raya/" ]; then 
    mkdir "/tmp/v2raya" 
fi
if [ ! -d "/var/log/v2raya/" ]; then
    ln -s "/tmp/v2raya/" "/var/log/"
fi

export V2RAYA_CONFIG="/usr/local/etc/v2raya"
export V2RAYA_LOG_FILE="/tmp/v2raya/v2raya.log"

START() {
    start-stop-daemon -S -b -p $pid_file -m -x $v2rayA_bin
}

STOP() {
    start-stop-daemon -K -p $pid_file && rm $pid_file
}

case "$1" in
    start)
        echo "Starting V2raya..."
        START
        echo "v2rayA started"
        ;;

    stop)
        echo "Stopping V2raya..."
        STOP
        echo "v2rayA stopprd"
        ;;

    restart)
        echo "Restarting V2raya..."
        STOP
        sleep 3
        START
        echo "v2rayA restarted"
        ;;

    log)
        echo "Displaying V2raya Logs..."
        tail -f /var/log/v2raya/v2raya.log
        ;;
esac
exit 0

v2raya-installer's People

Contributors

marksonhon 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.