Skip to content

XDRIVE transport: local storage - #6745

Merged
RPRX merged 1 commit into
XTLS:xdrivefrom
Risaro:xdrive-fix-import
Sep 19, 2026
Merged

RPRX merged 1 commit into
XTLS:xdrivefrom
Risaro:xdrive-fix-import

Conversation

@Risaro

@Risaro Risaro commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

infra/conf/transport_internet.go uses xdrive.Config, but the file does not import transport/internet/xdrive, so the package does not build on this branch:

infra/conf/transport_internet.go:472:13: undefined: xdrive

Adding the import fixes it.

@Risaro

Risaro commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Sorry, I'll try it on the local disk first, and then on the final target.

https://youtu.be/JqYhuwu614Y?list=RDJqYhuwu614Y

@Risaro Risaro changed the title XDRIVE: Add missing import in infra/conf XDRIVE transport: Implement it over a local storage backend Sep 10, 2026
@Risaro

Risaro commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

List 548 ms , get 850 ms , put 2.9s gaaad daaaam 1 race ohh dont worry my ethernet its a shit i have 100 mbits
UPD : list and get spedly 2x 200 ms list for servers not my shit uplink :d <

RTT client-server 2.4s
RTT SERVER-client 3.6s

400 kb 12.4c = 31.5 kb/s

its my house in a yakutsk

Race 1

HAHAHAH 8 paralel get 1307 kb/s

4 pararels put 60 kb/s
8 pararels put 56

DIrve cut 60 kb/s ??
for put aaaaaaaaaaa dot think so

Maybe a have trouble for my uplink i think so

Race 2

Okay go t chks for server moscow and Amsterdam NL
https://youtu.be/bjJ7KCBykVU?list=RDbjJ7KCBykVU

Race 1

4 next next put 199
8 pararels put 1637kb/s
8 paralels get 2453

yeaaaaah a true i have a local trouble my uplink :(
Servers a gd foreve

RACE 2
concurency 16 988 KB/S ~ 8 MB/S AAAAAAAA YEAH I HAVE SEE MY REELS FOR INSTAGRAM YEAH

RACE 3
segment 512 kib concurency 32 size 10 mb
2111 kb/s ~ 17 mb/s

race 4
50 mb for 21.6 s 18.5 mb/s

Speaking of Google Drive, it’s acting like a total bitch—the smaller the file, the slower the speed. Maybe—hahaha—it’s about "bumping" the transfer? I don't think so, but it's something worth keeping in mind.

@Risaro Risaro changed the title XDRIVE transport: Implement it over a local storage backend XDRIVE transport Sep 10, 2026
@RPRX

RPRX commented Sep 11, 2026

Copy link
Copy Markdown
Member

还有这种好事?不会是 AI 智能体越狱了吧

不确定你有没有参考 #5654 ,不过 AI 代码不值钱,看不看都行,我先把 #5645 基于 main rebase 一下吧

此外测试、使用这个东西记得开 mux.cool,不然会创建很多文件从而可能降低吞吐量

@RPRX

RPRX commented Sep 11, 2026

Copy link
Copy Markdown
Member

@Risaro 基于现在的 xdrive 分支进行 rebase,该 PR 本地测试通过后即可合并,与 Google Drive 等服务的集成可以放别的 PR

@RPRX

RPRX commented Sep 11, 2026

Copy link
Copy Markdown
Member

刚看到你宣称已经集成了 Google Drive,看了下 drive.go,是否参考了 #5645 (comment) ?

@Risaro

Risaro commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@RPRX
Hello - no, it hasn't escaped its sandbox. If it comes across as impulsive, that's just me: I've been working on this all night and went a little mad.

I use AI only for reading and making sense of classes, and for writing commit messages - because I'm a clumsy Russian guy poking around in someone else's code, and I'm afraid my usual WIP commit names are the kind nobody likes. So I use these gadgets for the tidying-up parts, especially network tests and similar things. They also help me find my way around code that isn't mine. So yes, a lot of this is AI slop, but I read through what it wrote and it looks reasonable enough, and a rewrite can come later.

About your question on the comment - no, bro, I wasn't inspired by it. My thinking is that when you're storing data on someone else's storage service, it's better to use plain native net/http(smoke rest api for api drives); the binary stays smaller that way. I read your branch and the user comments - people are asking for Yandex Disk and a lot of other integrations like that, and I don't think stuffing your Xray with that kind of thing is worth it.

This branch was made so you'd remember this idea again, and because I want to help. I'll rebase now, push there, and start the rewrite - for your peace of mind.

@Risaro

Risaro commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@RPRX I’ll give you a shout next time everything is ready. I just checked with Mux—you’re right, I’ve still got a lot of work to do here with retries and the like. Then comes the rewrite, and after that, I plan to add a route for Mail Cloud instead of Yandex Disk.

@RPRX

RPRX commented Sep 11, 2026

Copy link
Copy Markdown
Member

@Risaro 显然我只是懒得,咳不对,只是还没来得及写代码,如果有人愿意 PR 的话,咳,那自然是极好的,我完全支持

引入 N 种网盘 SDK 当然不是预期方案,除非是精简集成了各家 API 的库,另外,为什么 Mail Cloud 优先于 Yandex Disk?

我对 XDRIVE 的设计理念是它需要把 Mux 交给 VLESS 层去完成,一个出站只建一个 session,而 H2/H3 多路复用是另一回事

@Risaro

Risaro commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor Author

@RPRX

  1. Got it. I'll keep sending PRs then.

  2. No SDKs. The Google Drive backend is plain net/http and adds zero entries to go.mod. It sits behind a five method Storage interface (Put, Get, Delete, List, Close), so every further provider is one file and no dependency. That is also why I would rather not reach for a combined multi provider library: it would bring back exactly the dependency I just avoided.

    I removed the block regarding Yandex and Mail.ru because, to put it bluntly, it would cause us all a lot of pain.

    Without mux: 23675 ms, 30 sessions created, 31 objects left in the folder. With mux.cool at concurrency 8: 8605 ms, 4 sessions, 4 objects. That is 2.75 times faster, and it is already the case at concurrency 8, so one session per outbound, the way you describe it, is the limit case of the same curve.

    One data point that went against my own expectation: on the local disk backend the ordering reverses, and mux is about 16% slower there (4537 ms versus 3905 ms), because a poll costs microseconds instead of a network round trip. So the win comes specifically from cutting API round trips, not from fewer files as such.

Current state: #6745 is local storage only now, as you asked, and the Google Drive backend is split out and waiting for its own PR. The Windows CI failure is fixed, and it was a real bug rather than a flake. I wrote the announcement timestamp into the file name with second granularity, so a session created late in a second could be judged stale before the listener accepted it. It is nanoseconds now, with a regression test that fails on the old code. All 30 checks are green.

@Risaro Risaro changed the title XDRIVE transport XDRIVE transport: local storage Sep 11, 2026
@Risaro

Risaro commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@RPRX Bro, I want to implement this as an xhttp method, universally.
Next, after the fixes, I'll open a PR with Google drive - that one's ready too, I'll split them up. Then you can dig into Mail and the other clouds, okay?

@RPRX

RPRX commented Sep 11, 2026

Copy link
Copy Markdown
Member

One data point that went against my own expectation: on the local disk backend the ordering reverses, and mux is about 16% slower there (4537 ms versus 3905 ms), because a poll costs microseconds instead of a network round trip. So the win comes specifically from cutting API round trips, not from fewer files as such.

这是符合预期的

@RPRX Bro, I want to implement this as an xhttp method, universally. Next, after the fixes, I'll open a PR with Google drive - that one's ready too, I'll split them up. Then you can dig into Mail and the other clouds, okay?

As an xhttp method 指的是什么

Mail Cloud 就是 mail.ru 吗?其实你可以一次性把尽可能多的 service 塞进 #6748

@RPRX
RPRX merged commit 4b5596f into XTLS:xdrive Sep 19, 2026
40 checks passed
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

Successfully merging this pull request may close these issues.

2 participants