Как стать автором
Обновить
0
0

Пользователь

Отправить сообщение

Похоже я тут сам с собой разговариваю и надоел :))), но спросить больше негде!
Я все настроил, через VLESS от клиента через портал на бридж ходит трафик, глобал и локалка доступна через бридж.
Начал разбираться с роутингом, хочу сделать так, чтобы только определенные домены и ip адреса шли через бридж, все остальное шло через портал в глобал.
Например, хочу чтобы 192.168.5.1 шел в бридж, в конфиге портала прописываю:

"routing": {
        "rules": [
            {
                "type": "field",
                "inboundTag": [
                    "incoming"
                ],
                "ip":"192.168.5.1",
                "outboundTag": "portal"
            }
        ]
    }

Но доступа к 192.168.5.1 на клиенте не получаю. В логах бриджа пусто, в логах портала следующее:

IP:13262 accepted tcp:192.168.5.1:80 [incoming -> portal] email: ***

Подскажите, что делаю не так?

Пробую правила на портале прописать, чтобы 2ip.ru шел через бридж. Не работаю, что делаю не так?

"routing": {
"rules": [
{
"type": "field",
"domain": ["2ip.ru"],
"outboundTag": "portal"
}
]
}

вот такая ошибка в логах, проблема в DNS?


[Info] app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: failed to open connection to tcp:8.8.8.8:443 > common/retry: [dial tcp 8.8.8.8:443: i/o timeout dial tcp 8.8.8.8:443: connect: no route to host dial tcp 8.8.8.8:443: i/o timeout] > common/retry: all retry attempts failed

Спасибо! VLESS настроил доступ к локальной сети бриджа, в глобал через бридж не могу выйти!
Как настроить правила на портале, чтобы весь трафик шел в глобал через портал, а на определенные IP и домены через бридж?

Понял, буду разбираться! :)

Взял из sing-box, который на телефоне стоит, видимо что-то не то сделал :)

при загрузке конфига такую ошибку выдает:

Failed to start: main: failed to load config files: [/usr/local/etc/xray/config.json] > infra/conf: failed to parse to outbound detour config. > infra/conf: unknown config id:

xray.service: Main process exited, code=exited, status=23/n/a

Я запускал на SS-2022 а сейчас на VLESS не работает.
Я про эти логи, как их посмотреть?
xray[1856216]: 11.11.11.11:10457 accepted 22.22.22.22:443 [incoming -> portal]
xray[1856216]: proxy/shadowsocks_2022: tunnelling request to tcp:reverse.hellohabr.com:0
xray[1856216]: app/dispatcher: taking detour [portal] for [tcp:reverse.hellohabr.com:0]
xray[1856216]: common/mux: dispatching request to udp:reverse.internal.v2fly.org:0
xray[1856216]: [33.33.33.33]:63786 accepted reverse.hellohabr.com:0 [incoming -> portal]

Посмотрите, что может быть не так с конфигом, bridge похоже не подключается к portal.
И еще вопрос, как посмотреть логи xray?

{
    "reverse": {
        "bridges": [
            {
                "tag": "bridge",
                "domain": "reverse.hellohabr.com"
            }
        ]
    },
    "outbounds": [
        {
            "type": "vless",
            "server": "000.000.000.000",
            "server_port": 443,
            "uuid": "09346f9c-ad02-4f8c-8b8e-bc7a3b92cc50",
            "flow": "xtls-rprx-vision",
            "tls": {
                "enabled": true,
                "server_name": "www.microsoft.com",
                "utls": {
                    "enabled": true,
                    "fingerprint": "chrome"
                },
                "reality": {
                    "enabled": true,
                    "public_key": "Z9hU9PU0OLdn1YOUSWsH2B_g8mbm0ZuPH_NHl7VC7SE",
                    "short_id": "7e1b81daf28055e1"
                }
            },
            "packet_encoding": "",
"tag": "outgoing"
        },

        {
            "protocol": "freedom",
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "tag": "block"
        }
    ],
    "routing": {
        "rules": [
            {
                "type": "field",
                "inboundTag": [
                    "bridge"
                ],
                "domain": [
                    "full:reverse.hellohabr.com"
                ],
                "outboundTag": "outgoing"
            },
            {
                "type": "field",
                "inboundTag": [
                    "bridge"
                ],
                "outboundTag": "direct"
            }
        ]
    }
}

По статье все настроил, работает отлично, доступ в локалку есть!
Подскажите, как на portal настроить rules, чтобы на bridge пускать только определенные IP и домены, а все остальное чтобы шло через portal в глобал?

эта команда помогла, конфиг подхватился.
systemctl daemon-reload

Какой-то абсурд, удалил все из конфига, оставил {}, а все равно xray не стартует. Путь к конфигу проверил /usr/local/etc/xray/config.json.

На всякий случай еще раз скрипт запустил:
bash -c "$(curl -L https://raw.githubusercontent.com/XTLS/Xray-install/046d9aa2432b3a6241d73c3684ef4e512974b594/install-release.sh)" @ install --version 1.8.6

Ошибка та же:

failed to read config file at line 16 char 19 > invalid character '.' after object key:value pair

Спасибо за ответы, буду пытаться настроить :)

Так, ладно, конфиг буду переписывать, хотя скопипастил отсюда :)
А как настроить 3x-ui, куда вставлять настройки сервера ("portal")?

Или на vps лучше поставить голый xray без оболочки?

прогнал через валидатор, все в нормально, но ошибка та же!

/conf/serial: failed to read config file at line 16 char 19 > invalid character '.' after object key:value pair

Ругается на точку в IP адресе, я так понял

Не могу победить Kitty, не переносит выводимый текст на другую строчку, поэтому всё не копируется :(

  1. Создал клиента на vps в 3x-ui

  2. Установил xRay на bridge
    bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install

  3. Прописал конфиг на bridge

{
"reverse": {
"bridges": [
{
"tag": "bridge",
"domain": "reverse.hellohabr.com"
}
]
},
"outbounds": [
{
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "xxx.xxx.xxx.xxx",
"port": 34862,
"method": "2022-blake3-aes-256-gcm",
"password": "BTbEg8DduZthSx/nZx7nEyZjTjIuxw1bhV0VrL0/s98="
}
]
},
"tag": "outgoing"
},
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block"
}
],
"routing": {
"rules": [
{
"type": "field",
"inboundTag": ["bridge"],
"domain": ["full:reverse.hellohabr.com"],
"outboundTag": "outgoing"
},
{
"type": "field",
"inboundTag": ["bridge"],
"outboundTag": "direct"
}
]
}
}

При запуске xRay на bridge выдает ошибку

root@armbian:~# journalctl -u xray
Journal file /var/log/journal/84152d3d1a5b70e8a8566df06569a60c/system.journal is truncated, ignoring file.
Dec 07 12:30:12 armbian systemd[1]: [?] /etc/systemd/system/xray.service:7: Special user nobody configured, this is not>
Dec 07 12:30:12 armbian systemd[1]: Started xray.service - Xray Service.
Dec 07 12:30:12 armbian xray[6688]: Xray 1.8.4 (Xray, Penetrates Everything.) Custom (go1.21.0 linux/arm64)
Dec 07 12:30:12 armbian xray[6688]: A unified platform for anti-censorship.
Dec 07 12:30:12 armbian xray[6688]: 2023/12/07 12:30:12 [Info] infra/conf/serial: Reading config: /usr/local/etc/xray/c>
Dec 07 12:30:12 armbian xray[6688]: 2023/12/07 12:30:12 [Warning] core: Xray 1.8.4 started
Dec 07 12:30:13 armbian systemd[1]: [?] /etc/systemd/system/xray.service:7: Special user nobody configured, this is not>
Dec 07 15:29:47 armbian systemd[1]: Stopping xray.service - Xray Service...
Dec 07 15:29:47 armbian systemd[1]: xray.service: Deactivated successfully.
Dec 07 15:29:47 armbian systemd[1]: Stopped xray.service - Xray Service.
Dec 07 15:29:47 armbian systemd[1]: xray.service: Consumed 3.841s CPU time.
Dec 07 15:29:47 armbian systemd[1]: Started xray.service - Xray Service.
Dec 07 15:29:47 armbian xray[8313]: Xray 1.8.4 (Xray, Penetrates Everything.) Custom (go1.21.0 linux/arm64)
Dec 07 15:29:47 armbian xray[8313]: A unified platform for anti-censorship.
Dec 07 15:29:47 armbian xray[8313]: 2023/12/07 15:29:47 [Info] infra/conf/serial: Reading config: /usr/local/etc/xray/c>
Dec 07 15:29:47 armbian xray[8313]: Failed to start: main: failed to load config files: [/usr/local/etc/xray/config.jso>
Dec 07 15:29:47 armbian systemd[1]: xray.service: Main process exited, code=exited, status=23/n/a
Dec 07 15:29:47 armbian systemd[1]: xray.service: Failed with result 'exit-code'.
Dec 07 15:37:30 armbian systemd[1]: Started xray.service - Xray Service.
Dec 07 15:37:30 armbian xray[8360]: Xray 1.8.4 (Xray, Penetrates Everything.) Custom (go1.21.0 linux/arm64)
Dec 07 15:37:30 armbian xray[8360]: A unified platform for anti-censorship.
Dec 07 15:37:30 armbian xray[8360]: 2023/12/07 15:37:30 [Info] infra/conf/serial: Reading config: /usr/local/etc/xray/c>
Dec 07 15:37:30 armbian xray[8360]: 2023/12/07 15:37:30 [Warning] core: Xray 1.8.4 started

Спасибо, уважаемый автор за ваши труды!
Могли бы Вы сделать пошаговую инструкцию по настройке реверс-прокси, не совсем понятно как это сделать, если есть vps с 3x-ui и одноплатник на armbian в локалке.

Информация

В рейтинге
Не участвует
Зарегистрирован
Активность