xvzc / SpoofDPI

A simple and fast anti-censorship tool written in Go
Apache License 2.0
3.33k stars 242 forks source link

Junk in the debug output (possible cause of crashes?) #141

Open zimbabwe303 opened 4 weeks ago

zimbabwe303 commented 4 weeks ago

Describe the bug

When I use the -debug option sometimes I get junk characters in the terminal following the HTTP header. I also had a couple of crashes without the -debug option, I wonder if they are caused by the same issue.

Expected behavior

No junk characters.

Actual behavior

I get characters beyond ASCII.

How To Reproduce?

Run spoof-dpi -enable-doh -debug Watch YouTube videos (only from Russia?) for some time, scroll the comments, etc.

Client information

OS: Linux (Debian 12 stable)

Version: Git master cloned on August 14, 13:54 UTC

Additional context

Screenshot

LiquidTheDangerous commented 4 weeks ago

@zimbabwe303 Revision number? Does crashes looks like here #139?

LiquidTheDangerous commented 4 weeks ago

@zimbabwe303 These broken symbols are the payload of the request. I found something similar here https://www.reddit.com/r/software/comments/5e5z9f/mpchc_trying_to_connect_to_infected_website/

LiquidTheDangerous commented 4 weeks ago

The problem may be if these symbols contain a control sequence. Then the terminal may beep

zimbabwe303 commented 4 weeks ago

@zimbabwe303 Revision number? Does crashes looks like here #139?

v0.10.7 but before the release, it was just a clone of the master branch. May be the problem is fixed now, I'll test it.

I cannot tell what the crashes looked like because I rarely leave spoof-dpi running in the terminal, most of the time it's in the daemon mode (&).

zimbabwe303 commented 4 weeks ago

The problem may be if these symbols contain a control sequence. Then the terminal may beep

Also, in general, it's better avoid dumping raw unfiltered data into the text console. All sorts of things may happen, depending on the terminal program.

LiquidTheDangerous commented 4 weeks ago

@zimbabwe303 tell your revision number please

zimbabwe303 commented 4 weeks ago

@zimbabwe303 tell your revision number please

See above. v0.10.7 but before the release. I forgot to put an extra line after the quote.

xvzc commented 4 weeks ago

let me check if the new dns over https feature have some issue tomorrow

LiquidTheDangerous commented 4 weeks ago

@zimbabwe303 in the cloned repo

git log --pretty=format:'%h' -n 1
zimbabwe303 commented 4 weeks ago

@zimbabwe303 in the cloned repo

git log --pretty=format:'%h' -n 1

4721bd6

Sorry, never used that feature.

LiquidTheDangerous commented 4 weeks ago

@zimbabwe303 update your branch. The problem with random drops was fixed today

LiquidTheDangerous commented 4 weeks ago

@zimbabwe303 revision 3bdf24ca8ab7559aecc41cf020b5a32ed2e72475 should be stable

zimbabwe303 commented 4 weeks ago

Thanks. I think I'll better stick to v0.10.7 release for a while. When, when there'll be more upstream changes I'll do pull on my master clone.