Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhttp last changes #1514

Open
esodrevo opened this issue Dec 15, 2024 · 7 comments
Open

xhttp last changes #1514

esodrevo opened this issue Dec 15, 2024 · 7 comments

Comments

@esodrevo
Copy link

Hello,

I am using dev version with the most recent update. Please review the following issues regarding the xhttp transport and make the necessary adjustments if required:

  1. Parameters related to the extra section or xhttpSettings cannot be customized and are applied to the client as default settings.

  2. Settings related to xmux, which should only be applied to the client, are not being applied at all.

  3. As far as I have studied about xhttp, this configuration supports separating download and upload data. For this purpose, there is a section called downloadSettings. However, in the Marzban panel, based on my tests, it is not possible to use this feature.

  4. It is not possible to use xhttp with either TLS or Reality, and it remains non-TLS.

(I made as many changes as possible in the template file, but neither the parameters related to extra are updated nor is it possible to apply xmux from the trick file template.)

Here is the link to the page regarding the latest xhttp changes:
XTLS/Xray-core#4113

@chitoz1300
Copy link

chitoz1300 commented Dec 15, 2024

سلام عرض و ادب

ببخشید که فارسی می‌نویسم.

دقیقاً همین مشکل برای من هم هست. متأسفانه توی پنل امکان اضافه کردن extra xhttp وجود نداره!

لطفاً این قابلیت رو به فرانت اضافه کنید. منظورم دقیقاً چیزی هست که توی عکس زیر مشخصه.

ممنون از زحماتتون!

مقدار پیشفرض

image

و مقداری که میخوایم مثلا قرار بدیم.

image

و اینکه ی باگیم که داره اگر بخوایم اینباندی بسازیم بصورت زیر (مسیر سرتیفیکیت حذف کردم )

{
        "tag": "VLESS_xhttp",
        "listen": "@xhttp",
        "protocol": "vless",
        "settings": {
          "decryption": "none",
          "clients": []
        },
        "streamSettings": {
          "network": "xhttp",
          "xhttpSettings": {
            "path": "/xhttp"
          }
        }
      },
      {
      "tag": "VLESS_xhttp2",
        "port": 8443,
        "listen": "0.0.0.0",
        "protocol": "vless",
        "settings": {
          "clients": [],
          "decryption": "none",
          "fallbacks": [
            {
              "dest": "@xhttp"
            }
          ]
        },
        "streamSettings": {
          "network": "raw",
          "security": "tls",
          "tlsSettings": {
          "certificates": [
            {
              "certificateFile": "/var/lib/marzban/certs/",
              "keyFile": "/var/lib/marzban/certs/"
            }
          ]
          }
        }
      },{
      "tag": "VLESS_xhttp3",
        "port": 2083,
        "listen": "0.0.0.0",
        "protocol": "vless",
        "settings": {
          "clients": [],
          "decryption": "none",
          "fallbacks": [
            {
              "dest": "@xhttp"
            }
          ]
        },
        "streamSettings": {
          "network": "raw",
          "security": "tls",
          "tlsSettings": {
             "certificates": [
            {
              "certificateFile": "/var/lib/marzban/certs/",
              "keyFile": "/var/lib/marzban/certs/"
            }
          ]
          }
        }
      }
    

و بروی اینباند های هاست کلیک میکنیم بالا اکسترنال 500 میده و این خطاشه
و مرزبان هم آخرین نسخه Dev نصبه

marzban-1  | ERROR:    Exception in ASGI application
marzban-1  | Traceback (most recent call last):
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
marzban-1  |     result = await app(  # type: ignore[func-returns-value]
marzban-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
marzban-1  |     return await self.app(scope, receive, send)
marzban-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
marzban-1  |     await super().__call__(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/applications.py", line 113, in __call__
marzban-1  |     await self.middleware_stack(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in __call__
marzban-1  |     raise exc
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in __call__
marzban-1  |     await self.app(scope, receive, _send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 85, in __call__
marzban-1  |     await self.app(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
marzban-1  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
marzban-1  |     raise exc
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
marzban-1  |     await app(scope, receive, sender)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 715, in __call__
marzban-1  |     await self.middleware_stack(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 735, in app
marzban-1  |     await route.handle(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
marzban-1  |     await self.app(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
marzban-1  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
marzban-1  |     raise exc
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
marzban-1  |     await app(scope, receive, sender)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 73, in app
marzban-1  |     response = await f(request)
marzban-1  |                ^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 327, in app
marzban-1  |     content = await serialize_response(
marzban-1  |               ^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 176, in serialize_response
marzban-1  |     raise ResponseValidationError(
marzban-1  | fastapi.exceptions.ResponseValidationError: 2 validation errors:
marzban-1  |   {'type': 'int_type', 'loc': ('response', 'vless', 3, 'port', 'int'), 'msg': 'Input should be a valid integer', 'input': None}
marzban-1  |   {'type': 'string_type', 'loc': ('response', 'vless', 3, 'port', 'str'), 'msg': 'Input should be a valid string', 'input': None}
marzban-1  | 
marzban-1  | INFO:     :49398 - "GET /api/inbounds HTTP/1.1" 500 Internal Server Error
marzban-1  | ERROR:    Exception in ASGI application
marzban-1  | Traceback (most recent call last):
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
marzban-1  |     result = await app(  # type: ignore[func-returns-value]
marzban-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
marzban-1  |     return await self.app(scope, receive, send)
marzban-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
marzban-1  |     await super().__call__(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/applications.py", line 113, in __call__
marzban-1  |     await self.middleware_stack(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in __call__
marzban-1  |     raise exc
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in __call__
marzban-1  |     await self.app(scope, receive, _send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 85, in __call__
marzban-1  |     await self.app(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
marzban-1  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
marzban-1  |     raise exc
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
marzban-1  |     await app(scope, receive, sender)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 715, in __call__
marzban-1  |     await self.middleware_stack(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 735, in app
marzban-1  |     await route.handle(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
marzban-1  |     await self.app(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
marzban-1  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
marzban-1  |     raise exc
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
marzban-1  |     await app(scope, receive, sender)
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 73, in app
marzban-1  |     response = await f(request)
marzban-1  |                ^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 327, in app
marzban-1  |     content = await serialize_response(
marzban-1  |               ^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 176, in serialize_response
marzban-1  |     raise ResponseValidationError(
marzban-1  | fastapi.exceptions.ResponseValidationError: 2 validation errors:
marzban-1  |   {'type': 'int_type', 'loc': ('response', 'vless', 3, 'port', 'int'), 'msg': 'Input should be a valid integer', 'input': None}
marzban-1  |   {'type': 'string_type', 'loc': ('response', 'vless', 3, 'port', 'str'), 'msg': 'Input should be a valid string', 'input': None}
marzban-1  | 

@ImMohammad20000
Copy link
Collaborator

ImMohammad20000 commented Dec 15, 2024

First of all the downstream not supported by marzban we will add it in the future

The extra object will use the parameters in the inbound config for v2ray links Its not use for custom configs

xmux will add from inbound config

@ImMohammad20000
Copy link
Collaborator

  1. It is not possible to use xhttp with either TLS or Reality, and it remains non-TLS.

send ur inbound config

@esodrevo
Copy link
Author

  1. It is not possible to use xhttp with either TLS or Reality, and it remains non-TLS.

send ur inbound config

here:

{
  "tag": "VLESSxhttp",
  "listen": "0.0.0.0",
  "port": 443,
  "protocol": "vless",
  "settings": {
    "clients": [],
    "decryption": "none"
  },
  "streamSettings": {
    "network": "xhttp",
    "xhttpSettings": {
      "host": "",
      "path": "/xhttp",
      "mode": "auto",
      "extra": {
        "headers": {},
        "xPaddingBytes": "100-1000",
        "noSSEHeader": false,
        "scMaxEachPostBytes": 1000000,
        "scMaxConcurrentPosts": 100
      },
      "security": "tls",
      "tlsSettings": {
        "serverName": "",
        "certificates": [
          {
            "ocspStapling": 3600,
            "certificateFile": "/var/lib/marzban/certs/ex.com/fullchain.cer",
            "keyFile": "/var/lib/marzban/certs/ex.com/privkey.key"
          }
        ],
        "minVersion": "1.2",
        "maxVersion": "1.3",
        "cipherSuites": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
      }
    }
  }
}

@esodrevo
Copy link
Author

First of all the downstream not supported by marzban we will add it in the future

The extra object will use the parameters in the inbound config for v2ray links Its not use for custom configs

xmux will add from inbound config

this is what it is;

    "xPaddingBytes": "100-1000",
    "noGRPCHeader": false, // stream-up/one, client only
    "noSSEHeader": false, // server only
    "scMaxEachPostBytes": 1000000, // packet-up only
    "scMaxConcurrentPosts": 100, // packet-up only
    "scMinPostsIntervalMs": 30, // packet-up, client only
    "keepAlivePeriod": 0, // h2/h3, client only
    "xmux": { // h2/h3, client only
        "maxConcurrency": "16-32",
        "maxConnections": 0,
        "cMaxReuseTimes": "64-128",
        "cMaxLifetimeMs": 0

in my book we should use "xPaddingBytes" , "scMaxEachPostBytes" , "scMaxConcurrentPosts" in both sides ( server & client) even with the different numbers ,

and some need to configure only client side( custom config) such as "scMinPostsIntervalMs".

im not sure what you mean of "inbound config", but if you mean server side, then no its not mented just for inbound config

@fodhelper
Copy link
Contributor

First of all the downstream not supported by marzban we will add it in the future

The extra object will use the parameters in the inbound config for v2ray links Its not use for custom configs

It's better to add it to the Dashboard like Fragment and Noise, then there will be no need to create many Inbounds for different scenarios
It's also beneficial for Custom Configs, because it will override the xhttpSettings values

@ImMohammad20000
Copy link
Collaborator

First of all the downstream not supported by marzban we will add it in the future

The extra object will use the parameters in the inbound config for v2ray links Its not use for custom configs

It's better to add it to the Dashboard like Fragment and Noise, then there will be no need to create many Inbounds for different scenarios It's also beneficial for Custom Configs, because it will override the xhttpSettings values

it will added to new Dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants