Skip to content

alsuo/ansible-xray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Xray Ansible Collection

Installation

ansible-galaxy collection install git+https://github.com/alsuo/ansible-xray.git

Role: alsuo.xray.xray_core

Installs and configures the latest xray-core.

Usage

Example playbook:

- hosts: yourhost
  become: yes

  collections:
    - alsuo.xray

  vars:
    xray_config:
      log:
        access: /var/log/xray/access.log
        error: /var/log/xray/error.log
        loglevel: debug
      inbounds:
        - ... your inbound config here ...
      outbounds:
        - ... your outbound config here ...
      routing:
        domainStrategy: IPIfNonMatch
        rules:
          - ... your routing rules here ...

  roles:
    - alsuo.xray.xray_core

Role Variables

# Enable/disable xray service
xray_enabled: true

# The user running xray
xray_user: xray

# The main group of xray user
xray_group: xray

# Directory containing .dat files
xray_assets_dir: /usr/local/share/xray

# Directory containing "config.json"
xray_config_dir: /usr/local/etc/xray

# Directory for storing logs.
# Xray will NOT log to this dir by default. You need to explicitly enable and configure logging (in config.json).
xray_logs_dir: /var/log/xray

# The Xray configuration.
xray_config: {}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published