Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 2y ago · link · parent

Telegram has public and private groups. They probably want to jail him for not pre-moderating every posted message.

comment 2y ago · link · parent

If he intentionally cooperated with criminals then it is one thing. But if someone posted something illegal, and nobody reported this, then it obviously is not Durov's fault. If you are too lazy to report illegal content then you should arrest yourselves first.

comment 2y ago · link · parent

If they want to arrest him for lack of pre-moderation, then it is ridiculous.

comment 2y ago · link · parent

I actually did some fiddling with Wireshark, and it looks to me that it should be easy to make a tunnel masquerading as TLS 1.3 in Python. Firefox's TLS requests mostly look the same except for several fields (like RandomId, SessionId, SNI) and it is easy to write a tunnel in Python that would send similar initial packets (so that they look exactly like the ones sent by the browser), and after pretending to setup a TLS session, incapsulate real traffic as TLS Application Data records. You don't need to implement real TLS protocol, you just need to make several initial packets by template.

The project you mentioned seems to be pretty complicated; I think it is possible to implement the tunnel in a single Python file without any external libraries. But I was not intending to implement any serious crypto, just masquerade traffic.

Yes, I saw that project and even the English documentation is not easy to read.

comment 2y ago · link · parent

The first project (swgp-go) which makes traffic resemble random noise, can be trivially blocked. The DPI calculates the ratio between number of 0 and 1 bits, and if their amount is approximately equal, and traffic doesn't match allowed protocol (like HTTPS), then the connection is blocked.

If you don't want to stand out you should use steganography and masquerade as a legitimate and popular protocol. It seems that MASQUE does exactly this.

comment 2y ago · link · parent

Russia and China uses DPI, although they often use relatively simple heuristics (like matching a SNI in the beginning of a TLS session).

comment 2y ago · link · parent

Both openvpn and wireguard protocols are trivially blocked by DPI. Why do people make custom protocols today? Everybody should use something standard and indistinguishable, like QUIC, DTLS or TLS1.3, for their transport layer.

comment 2y ago · link · parent

ISP can simply compile a blacklist of publicly available encrypted DNS resolvers and block them.

comment 2y ago · link · parent

Disagree, every time I use a EU proxy, I feel like a first-class citizen who has a privilege to opt-out. For comparison, other citizens only have the "agree" button.

comment 2y ago · link · parent

Lobbyists are there to maximize the profits of whoever hires them, not to care about general population. Nobody will care about general population except for themselves.

comment 2y ago · link · parent

> cost of acquiring a customer > cost of serving a customer

For a successful and popular product the cost of acquiring a customer is low. Heavy investments in advertising are needed for unpopular, overpriced products that naturally have a low demand.

For example, almost everything that I buy I bought not because of advertising but based on the comparison of product price and quality.

comment 2y ago · link · parent

Privacy of majority of population is more important than income of a bunch of corrupt SV engineers, isn't it?

comment 2y ago · link · parent

I wonder where do you find information like this? E.g. how a reverd is made, how those electronic drum sounds from classic drum machines are made and so on? Is there something like a big catalogue of different tricks and algorithms?

comment 2y ago · link · parent

You could start with making sounds using a software synth or PureData. There will be no issues with generating sine waves. And there are lot of tutorials for this.

If you aim for performance, you will have to use SIMD and language that supports it (for example, C, Rust).

comment 2y ago · link · parent

Interesting article, however in drums demo the reverb sound increases after the drum is hit, and this doesn't seem natural. I would expect the reverb to have only decay phase, but here the reverb has a slow attack as well.

comment 2y ago · link · parent

Wow that comment is so educating. I guess I'll pay more attention now to standard functions I use in C code.

As for weirdness of C standard, I guess it is because they wanted to make it compatible with obscure proprietary platforms which might not even exist anymore.

comment 2y ago · link · parent

It is a form of art. I hate watching dubbed videos, because the voice actors who translate it almost always are worse than original actors.

comment 2y ago · link · parent

As I understand, it first extracts text from original video into subtitles, translates them using external LLM, and then converts text to speech. All of this is done using thrid-party solutions, and the project seems to be just a GUI app that allows to integrate them.

You obviously cannot use this to translate songs or movies because this method loses important information like voice, intonation, etc.

So it is still better to use subtitles.

comment 2y ago · link · parent

Yes but you can use any GPU with Vulkan, not only NVIDIA.

comment 2y ago · link · parent

Cannot Vulcan compute be used to execute code on GPU without relying on proprietary libs? Why not?

comment 2y ago · link · parent

> X11 has XkbMapNotify/XkbStateNotify.

Yes, it seems I missed XkbStateNotify and XkbLockGroup that can be used to switch layouts (which X11 calls "groups").

comment 2y ago · link · parent

> Not particularly, the difficulty here is that some clients want text input, and some clients really do want key events

I understand this point. For this case it makes sense to send both key code (what character does the key map in Latin layout) and translated code (which characters will be printed when key is pressed in current layout). It seems an easier solution than broadcast large structures to every client and let them have each own implementation for translating codes.

Regarding IME, I meant not integrating IME client into a Wayland server but instead unify the API and events that IME uses to insert text with API and events used to notify about regular keypresses.

comment 2y ago · link · parent

But you can send both raw key codes and translated character code and let client decide what it needs (for example, for hotkeys like Ctrl + C you will probably prefer a raw key code so that it works independent of selected input language).

comment 2y ago · link · parent

I don't think you need translation modes; you could simply send both raw events and translated events simultaneously and let client choose what it needs.

comment 2y ago · link · parent

Also, I am curious: why in X11 and Wayland keyboard code translation happens on the client side? Wouldn't it make more sense if the layout was stored only on the server and server did the translation? There would be no need to broadcast layout changes, for example.

comment 2y ago · link · parent

Please let me rant a bit about X11 input APIs.

One of the major flaws in X11 is its poorly designed keyboard input system. When a key is pressed, the keypress event sends a "keycode" - an 8-bit number that references the current layout. This means you're limited to injecting characters that are present in the current layout.

The implications of this design are frustrating. For instance, if you're connecting to a remote system via VNC and the client and server have different keyboard layouts, you'll run into all sorts of issues. Similarly, how do you create an on-screen keyboard that can inject keypresses for characters not available in the current layout? And what if you want to programmatically send some text, but the user has the wrong layout active? It's a mess.

I guess because of this in Debian most of characters in on-screen keyboard didn't work (they "fixed" it by showing only characters present in active layouts instead of fixing the root issue).

The common workaround for this is an ugly hack: you modify the keyboard layout, find unused spots, add desired characters, send key press event and restore the keyboard layout back. See the code: [2]

Also, Wayland which was supposed to get rid of legacy problems, seems to have inherited this ugly design. Also, there seem to be no sane API for managing layouts or switching them programatically, or subscribing to layout change event. Also, you cannot use modifiers like Ctrl to switch layouts because then combinations like Ctrl + C stop working. Keyboard APIs on Linux are broken in the worst way possible since beginning, probably because most developers use only ASCII and do not have experience using multiple layouts.

A better idea would be to allow to send arbitrary Unicode strings and maybe integrate regular input and IME input (input system for typing Asian characters).

[1] https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.ht...

[2] https://github.com/Zirias/xmoji/blob/master/src/bin/xmoji/ke...

comment 2y ago · link · parent

By not telling what their endpoints are?

comment 2y ago · link · parent

Masquerading as legitimate traffic is important for many VPN users, I guess. Many don't want ISP to know they are using a VPN, and others don't want to get their VPN blocked.

comment 2y ago · link · parent

Can VPN providers rotate used IPs faster than they are blocked or it is too expensive?

comment 2y ago · link · parent

Cell modem or being on someone's WiFi gives away your location though.
1
727374
185