Coder Social home page Coder Social logo

lilendian0x00 / xray-knife Goto Github PK

View Code? Open in Web Editor NEW
97.0 97.0 14.0 383 KB

A swiss army knife for xray-core to do task such as parsing xray config links, network testing, switch outboud automatically etc

License: MIT License

Go 100.00%
cencorship gfw v2ray xray-core

xray-knife's People

Contributors

lilendian0x00 avatar mmmray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xray-knife's Issues

Input from json and output to json

First of all, thank you for developing this amazing tool! It's been incredibly useful.

I noticed on your to-do list that there is an ongoing need for enabling JSON input for core configurations. This feature could be particularly valuable since current methods do not support link-based configurations for fragmentation. For example, the Streisand app on iOS utilizes link fragmentation, but this approach isn't widely applicable.

Therefore, adding the option to convert links to JSON and to input configurations directly via JSON could be a significant enhancement. I am eager to contribute to the implementation of this feature. However, I must mention that I do not have experience with Go programming language. If there's any way I can assist or other preparatory tasks I could handle, please let me know.

Thanks for considering this enhancement. I look forward to your feedback!

PM: The 3x-ui project has implemented some features related to converting links to JSON within this folder. It's worth taking a look.

SSL/TLS Certificate Issue When Using Proxy Method

Hello,

I am encountering an SSL/TLS certificate issue when using the proxy method. Below are the details of the commands I am using and the error I receive.

Commands:
To create the proxy:

xray-knife proxy -v -p 2342 -c vless://..........

To test the proxy:

curl --proxy socks5://localhost:2342 https://api.ipify.org?format=json

Error:
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

Terminal Output:

==========INBOUND==========
Protocol: Socks
Remark: Listener
Network: tcp
Address: 127.0.0.1
Port: 2342
============================

==========OUTBOUND==========
Protocol: Vless
Remark:
Network: tcp
Address: 80.253.255.10
Port: 443
UUID: 7c7af2de-bb97-429f-ac3c-8ef849717491
Flow: none
TLS: none
============================
2024/06/30 15:34:15 [Debug] app/log: Logger started
2024/06/30 15:34:15 [Debug] app/proxyman/inbound: creating stream worker on 127.0.0.1:2342
2024/06/30 15:34:15 [Info] transport/internet/tcp: listening TCP on 127.0.0.1:2342
2024/06/30 15:34:15 [Info] transport/internet/udp: listening UDP on 127.0.0.1:2342
2024/06/30 15:34:15 [Warning] core: Xray 1.8.13 started
[+] 15:34:15 Started listening for new connections...
2024/06/30 15:34:29 [Info] [510997808] proxy/socks: TCP Connect request to tcp:104.26.13.205:443
2024/06/30 15:34:29 tcp:127.0.0.1:64690 accepted tcp:104.26.13.205:443 [socks >> proxy]
2024/06/30 15:34:34 [Info] [510997808] app/dispatcher: default route for tcp:104.26.13.205:443
2024/06/30 15:34:34 [Info] [510997808] transport/internet/tcp: dialing TCP to tcp:80.253.255.10:443
2024/06/30 15:34:34 [Debug] transport/internet: dialing to tcp:80.253.255.10:443
2024/06/30 15:34:34 [Info] [510997808] proxy/vless/outbound: tunneling request to tcp:104.26.13.205:443 via 80.253.255.10:443
2024/06/30 15:34:34 [Info] [510997808] app/proxyman/inbound: connection ends > proxy/socks: connection ends > context canceled

I want to thank you sincerely. This tool has enabled us to complete several projects successfully.

Speedtest of a config

Greetings and thank you for your efforts in this project.

Could you please clarify if there's an option to conduct a speed test on a configuration? I noticed a screenshot in the README showing batch testing of configuration files, but I couldn't locate a specific option for a speed test. Additionally, which version of Xray is currently in use? Is there a way to select a specific version or provide a path to a core? Lastly, is it feasible to input configurations from a file rather than through STDIN?

Nice Tool, some suggestions

It is very nice tool to test v2ray/xray configs. I hasn't seen any similar tool. (only vmessping, that doesn't work for me)

If it is possible separate tool from xray-core, then users can use other compatible version of xray-core.

Thank you for sharing.

Modify the package name

when i want to refer this package in my project ,but i get a error:

(py310_directml) PS C:\Users\32450\Documents\我的文档\projects\vscode\go\ppc-space-test-background> go get -u github.com/lilendian0x00/xray-knife
go: downloading github.com/lilendian0x00/xray-knife v1.6.13
go: github.com/lilendian0x00/xray-knife@upgrade (v1.6.13) requires github.com/lilendian0x00/xray-knife@v1.6.13: parsing go.mod:
        module declares its path as: xray-knife
                but was required as: github.com/lilendian0x00/xray-knife

so it's better to declare module as github.com/lilendian0x00/xray-knife,not xray-knife

Batch Processing Stops Due to Bad Configuration

Hi again!

I hope you're doing well. I'm encountering a small problem with xray-knife. When proceeding with batch processing from a file, xray-knife crashes or stops upon receiving a bad configuration, and it does not check the rest of the configurations. It would be really helpful if the tool could ignore the bad configuration and continue processing the other configurations.

I'm using net http --type csv --file "configurations.txt"

Thank you for looking into this!

Reading config from STDIN even with the --file option

I am running xray-knife with the following command:

./xray-knife proxy --file vless.link

In the vless.link file, I have a link in the format vless://..., which was generated by the x-ui panel.

After starting xray-knife, it still asks for the config from STDIN, even though I expect it to read the configuration from the link in vless.link.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.