Gozargah / Marzban

Unified GUI Censorship Resistant Solution Powered by Xray
https://t.me/gozargah_marzban
GNU Affero General Public License v3.0
3.18k stars 452 forks source link

Marzban doesn't include Host for HTTPUpgrade #1177

Closed Kiya6955 closed 1 month ago

Kiya6955 commented 1 month ago

Hi When I set Host for HTTPUpgrade inbounds no matter it's TLS or noTLS, marzban doesn't include host in configs and it leaves it empty so I have to set host manually in host settings.

iamtheted commented 1 month ago

We conducted a test together, it's true.

M03ED commented 1 month ago

i test it right now and output is correct

    "splithttpSettings": {
            "headers": {},
            "path": "/",
            "host": "xray.com",
            "maxUploadSize": 1000000,
            "maxConcurrentUploads": 10
        }
Kiya6955 commented 1 month ago

i test it right now and output is correct

    "splithttpSettings": {
            "headers": {},
            "path": "/",
            "host": "xray.com",
            "maxUploadSize": 1000000,
            "maxConcurrentUploads": 10
        }

We are talking about HTTPUpgrade.

M03ED commented 1 month ago

We are talking about HTTPUpgrade.

oh sorry but i can't find the problem, output is correct

"streamSettings": {
                    "network": "httpupgrade",
                    "security": "none",
                    "httpupgradeSettings": {
                        "headers": {},
                        "path": "/",
                        "host": "xray.com"
                    }
                }
Kiya6955 commented 1 month ago

We are talking about HTTPUpgrade.

oh sorry but i can't find the problem, output is correct

"streamSettings": {
                    "network": "httpupgrade",
                    "security": "none",
                    "httpupgradeSettings": {
                        "headers": {},
                        "path": "/",
                        "host": "xray.com"
                    }
                }

I think you set host manually in host settings. image

M03ED commented 1 month ago

I think you set host manually in host settings.

nope its empty

Kiya6955 commented 1 month ago

I think you set host manually in host settings.

nope its empty

How can i share my test panel with you?

Kiya6955 commented 1 month ago

I think i found the problem When we use

          "headers": {
            "Host": "example.com"
          }

instead of

"Host": "example.com"

this problem happened shouldn't it work this way too? I thought host is a part of headers section.

M03ED commented 1 month ago

I think i found the problem When we use

          "headers": {
            "Host": "example.com"
          }

instead of

"Host": "example.com"

this problem happened shouldn't it work this way too? I thought host is a part of headers section.

host can be part of headers but marzban will not catch it, because using host in headers is no common and mostly used in outbounds not inbounds

Kiya6955 commented 1 month ago

I think i found the problem When we use

          "headers": {
            "Host": "example.com"
          }

instead of

"Host": "example.com"

this problem happened shouldn't it work this way too? I thought host is a part of headers section.

host can be part of headers but marzban will not catch it, because using host in headers is no common and mostly used in outbounds not inbounds

Yes but most of Marzban users generate inbound with MarzbanInboundGenerator and this inbound generator set host in header for web socket and marzban doesnt have this bug in web socket.

OxJ4ck commented 1 month ago

Yes but most of Marzban users generate inbound with MarzbanInboundGenerator and this inbound generator set host in header for web socket and marzban doesnt have this bug in web socket.

شما باید از داکیومنت پروژه xray استفاده کنید. در ws هم بعد از ورژن 1.8.10 (فک کنم) قسمت هاست از بخش header جدا شده.

M03ED commented 1 month ago

Yes but most of Marzban users generate inbound with MarzbanInboundGenerator and this inbound generator set host in header for web socket and marzban doesnt have this bug in web socket.

That's just a third party project. Marzban always recommend using official docs.