Code Monkey home page Code Monkey logo

Comments (4)

DuckSoft avatar DuckSoft commented on June 7, 2024 1

你说的非常对,然而这个问题早已经在最新的预发行版本修复了。
https://github.com/Qv2ray/QvPlugin-Trojan-Go/releases

记得关注更新。

from qvplugin-trojan-go.

jinyuzu99 avatar jinyuzu99 commented on June 7, 2024

QvPlugin-Trojan-Go v3.0.0-pre3 prerelease 依然会报错.

[TrojanGo] [FATAL] 2021/01/26 14:20:39 github.com/p4gefau1t/trojan-go/url.(*url).Handle:option.go:73 empty host

填入 ws -> host 后不再报错.

from qvplugin-trojan-go.

DuckSoft avatar DuckSoft commented on June 7, 2024

maybe the following patch can fix it:

diff --git a/core/Serializer.hpp b/core/Serializer.hpp
index b11018c..94ba1b0 100644
--- a/core/Serializer.hpp
+++ b/core/Serializer.hpp
@@ -34,7 +34,11 @@ class TrojanGoSerializer : public PluginOutboundHandler
             query.addQueryItem("sni", obj.sni);
         if (obj.type == TRANSPORT_WEBSOCKET)
         {
-            query.addQueryItem("host", QUrl::toPercentEncoding(obj.host));
+            if (!obj.host.isEmpty()) {
+                query.addQueryItem("host", QUrl::toPercentEncoding(obj.host));
+            } else {
+                qWarning() << "empty host is deprecated when websocket is used";
+            }
             query.addQueryItem("path", QUrl::toPercentEncoding(obj.path));
             if (!obj.encryption.isEmpty())
                 query.addQueryItem("encryption", QUrl::toPercentEncoding(obj.encryption));

from qvplugin-trojan-go.

DuckSoft avatar DuckSoft commented on June 7, 2024

@sayomelu 试试这些打过补丁的版本:https://github.com/Qv2ray/QvPlugin-Trojan-Go/actions/runs/511420140

from qvplugin-trojan-go.

Related Issues (14)

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.