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 8y ago · link · parent

I haven't used Signal, so I don't know much about it. I know that Telegram has native clients for multiple platforms (real apps, not HTML/JS apps). For example, its Windows client is written in Qt and works on Windows XP. It is also very realiable and works good even on bad mobile connections.

Telegram has channels - it is like a microblog where the owner can post messages and images, and everybody else can only read them.

And in Russia Telegram is well known (unlike Signal) because its founder (Durov) is also a founder of social network VK.

Judging by screenshots, Telegram and Signal UI look similar (well, almost every IM app looks the same).

As I understand Signal, as Telegram, requires a phone number for registration and therefore doesn't provide much privacy (the government can easily track your location and identify you). I wouldn't give a real phone number to any of them.

comment 8y ago · link · parent

There is one more thing. When RosKomNadzor blocks an IP address, it states the reason for doing that. If you look at IP addresses of Telegram proxies, for example here [1] you'll see that the reason for blocking is not a court decision (which ordered to block Telegram). The stated reason is an order from Prosecutor's Office.

But when the Russian company filed an action against RKN, the Prosecutor's Office representative said that they didin't order to block unrelated IP addresses; it was RKN's own decision [2] [3]. And this is not according to the law. Doing everything according to the law would be too slow.

[1] https://reestr.rublacklist.net/rec/518267/

[2] https://roskomsvoboda.org/40800/

[3] https://www.gazeta.ru/tech/2018/08/06/11885923/i_snova_pro_t...

comment 8y ago · link · parent

Can you read Russian? Then here is the link: [1]

A Russian company filed an action against Roskommnadzor demanding to compensate a loss of 5,000,000 RUB (~$75 000). The court dismissed it though.

Here is another example: [2]

[1] https://www.gazeta.ru/tech/news/2018/08/27/n_11956687.shtml

[2] https://www.rbc.ru/society/06/08/2018/5b6848b39a794769383b9e...

comment 8y ago · link · parent

You are misleading people not familiar with Russian legislation. There is no law saying you can ban random IP addresses.

comment 8y ago · link · parent

If Telegram did something illegal why should other Internet users suffer damages? Even the Russian law doesn't say that.

The blocking was not done according to the law. If the Government followed its own laws, there would be a lot of paperwork for every new blocked IP address and they would play cat-and-mouse game with Telegram spending a lot of resources while Telegram could cheaply create new proxies instead of blocked ones. Effectively you cannot block Telegram if you follow the law.

So the Government started blocking large networks (like, 256 000 IP addresses at once or even more) whenever it found a single Telegram proxy server there. This is obviously against the law but who cares.

If you think I am wrong please point to the article that allows blocking 20 millions random IP addresses.

comment 8y ago · link · parent

Doesn't Trump say the same things about USA? Also, I never heard about a "god chosen nation".

comment 8y ago · link · parent

This is not related to cultural differences. The government just wants to read what people write about and block information they don't like. And I assume they have difficulties spying on opposition activists which happen to use Telegram too.

In Russia you can get prosecuted for reposting a meme on social network. Imagine how many "criminals" can be found if the police will be able to read private messages too.

comment 8y ago · link · parent

The MTProto traffic (which can be detected by signature) is wrapped into an obfuscation layer by some clients (including the official one). This layer makes packet look like random bytes. Earlier it has a flaw making all packets the same length and some ISPs started blocking packets by length by later it was fixed.

This my comment contains more links about protocol and obfuscation: https://news.ycombinator.com/item?id=17888241

comment 8y ago · link · parent

As I remember, Telegram first didn't even have the Russian language in UI and was used mostly in developing countries in South America and Middle Asia. For example, it was very popular in Iran and was used to spread information about recent anti-government protests [1].

[1] https://en.wikipedia.org/wiki/2017%E2%80%9318_Iranian_protes...

comment 8y ago · link · parent

I rechecked information and probably I was wrong. In Russia there is an official registry of companies and websites which are "distributors of information" and WhatsApp is not there. The companies in the registry are required by law to retain information about users at least for 6 months and provide it to authorities in some cases. Telegram is added to the registry.

In case anyone is curious to see what sites are interesting to the authorities, here is a copy of the registry in Russian [1] and a machine-translated version [2].

The first ones added to the registry in 2014 were a dating website (mamba), Russian social network VK, email services (Yandex and Mail.ru) and IT news websites Habrahabr and Roem. Probably developers and sysadmins are considered dangerous people so they need supervision.

Also there is a website snap.com operated by Snap Inc.

[1] https://reestr.rublacklist.net/distributors/

[2] https://translate.google.com/translate?sl=ru&tl=en&js=y&prev...

comment 8y ago · link · parent

I forgot to mention, Telegram also uses its own URL scheme to pass proxy settings so you can send the link to friends or publish it online and they will only have to click it to start using proxy. No need to dig through the settings and type in complicated IP addresses.

The link looks like tg://proxy?arguments

Proxy uses MTProto, the same protocol that client uses to talk to the server. It is described here: https://core.telegram.org/mtproto The client connects to the proxy as if it were a server, and proxy just relays encrypted packets to the real server. Also, the client may wrap packets with an obfuscation layer (described below) to prevent signature detection. In exchange, the server tells the client to display a channel of the proxy owner in the contact list while proxy is being used.

Proxy source on Github (with Docker image link): https://github.com/TelegramMessenger/MTProxy

Bing-translated Russian article about this proxy: https://www.microsofttranslator.com/bv.aspx?from=&to=en&a=ht...

Bing-translated review of methods Telegram uses to bypass filtering by an independent researcher: https://www.microsofttranslator.com/bv.aspx?from=&to=en&a=ht...

And a little more on obfuscation: https://blog.susanka.eu/how-telegram-obfuscates-its-mtproto-...

This article mentions that Telegram uses modified version of obfuscated2 protocol. To detect it the DPI just needs to decode all packets using AES but that would require a lot of CPU power which ISPs currently don't have. Initially all encrypted packets had fixed length so some ISPs started filtering packets by length (of course accidentally filtering non-Telegram packets too but who cares), and Telegram added random padding to prevent this.

comment 8y ago · link · parent

If they would not stop this they could be blocked in Russia completely (because Russian authorities started banning whole networks where Telegram servers or proxies were found).

comment 8y ago · link · parent

Telegram invented a smart thing to evade blocking. They made a proxy server and allowed the person hosting it to add a promo link for every user connecting through this server. This way Telegram channel owners are motivated to host such proxy servers and distribute their addresses so that their channel gets promoted for users of this server (and they get more readers and more profit).

So even if hosting providers like Amazon or Google will refuse to work with Telegram (because they don't want to get blocked in Russia for this), it will be difficult to find and ban all people hosting proxy servers.

Sadly, these proxy servers can be used only for connecting to Telegram.

comment 8y ago · link · parent

Signal or Keybase are not blocked in Russia. I suppose that is because they don't have many users like Telegram. WhatsApp is known to comply with Russian legislation (and ironically several of its addresses were accidentally blocked while trying to disrupt Telegram service).

comment 8y ago · link · parent

If they were anonymous Google wouldn't be able to match purchases against ad views or let users opt out. I suppose they are just exchanging something like a hash from customer data, so technically Google doesn't get personal information.

comment 8y ago · link · parent

As we found out, they buy the data - this time from Mastercard and collect a detailed profile of every user, maybe more detailed than 3-letter agencies have.

comment 8y ago · link · parent

That's how you become a product when there is no proper regulation.

> Before we launched this beta product last year, we built a new, double-blind encryption technology that prevents both Google and our partners from viewing our respective users

> We do not have access to any personal information from our partners’ credit and debit cards, nor do we share any personal information with our partners

That probably means that they do not get customers' names or email addresses but hashes of them. So technically no personal information is transferred.

comment 8y ago · link · parent

Without tracking the ad won't disappear, just some kinds of it can become more expensive and less effective; that is not a big problem. Companies can still show relevant ads: Google can show ads matching current search query, Youtube can show ads relevant to the video, and so on.

Regarding news sites, they have a lot of opportunities to earn money, for example, publish sponsored articles. They can also use subscription model. It is better than have mobile apps that scrap data from your phone, Google Maps that track every your step, and data brokers you never heard of but they have full information about you. We should not sacrifice our privacy only because someone out there cannot make the ends meet.

Google won't shut down if you stop it from tracking users' location. People will still search the internet and buy smartphones.

comment 8y ago · link · parent

Corporations want cheaper ads; I understand that but I don't understand why I should be tracked. They should develop better ads without violating someone's privacy or anonymity.

comment 8y ago · link · parent

I don't understand why there is so much negative impression of GDPR. Most businesses do not need to track users; they do it only because they can and it is not forbidden. Let me give you some examples:

- Wikipedia can serve you pages without knowing anything about you

- You can download and use Debian distribution without providing any data about yourself. Microsoft can do the same.

- Internet shops like Amazon or Ebay don't need to track you. They earn money when you buy something and if they delete PII after the order is completed they still have the money. GDPR is not taking them away.

- Google can work just fine without tracking users. They show advertisement in search results, they get paid for it and they don't need to collect everything you have typed to earn profit

- Youtube can show ads and get paid for it to completely anonymous users

- Android and Google Maps don't need to track you. You paid for them when you bought your device, you don't have to pay once more with your data and opt into dubious "help us improve your user experience" scams.

- Netflix gets money from you anyway and doesn't need to track you

- Facebook doesn't need to track you across the web. It can show ads and get paid for it anyway.

Look around. Most of businesses can earn money without collecting any personal information. The ones who can lose because of GDPR are only shady marketing agencies, legal spam conpanies, data brokers and three-letter agencies. I don't feel sorry for any of them.

We should think about better protection of privacy and anonimity rather than worry about profits of Californian corporations wanting to make everyone their product.

comment 8y ago · link · parent

That would be pretty slow. FastCGI doesn't start a new process for every request unlike CGI.

comment 8y ago · link · parent

You can write a server that will handle multiple requests in PHP, for example, using ReactPHP.

By the way, I don't like how they implemented promises and asynchronous file streams: they copied them from Node.JS and didn't implement proper error reporting (which Node did't have at the time too if I remember correctly). For example, if there is a promise that was rejected and the rejection is not handled, there will be no exception thrown. So the developer won't even know about an error, even if it is a syntax error. That's how poorly Javascript promises were designed. Now this is fixed in JS and unhandled rejection will produce a warning in the console but there are many other bad things about them.

comment 8y ago · link · parent

Better solution might be to run several daemon processes in parallel.

comment 8y ago · link · parent

I don't think Laravel is a good example. It uses a lot of global state and static method calls. It copied all bad things that were there in Ruby on Rails.

If you look at any code example here [1] you will see that global variables are used everywhere.

[1] https://laravel.com/docs/5.6/urls

comment 8y ago · link · parent

I don't like sessions in PHP: most times the problem can be solved without them.

But sessions are available in other languages as well:

- https://docs.djangoproject.com/en/2.1/topics/http/sessions/

- https://guides.rubyonrails.org/security.html#sessions

- https://www.npmjs.com/package/express-session

comment 8y ago · link · parent

PHP being stateless is a good thing, as well as real classes, real interfaces and type hinting.

Sadly, PHP developers still use bad coding practices. For example, one of the popular PHP OOP frameworks, Symfony, makes things like HTTP Request or logged user a global variable by storing it in DI container. What about incapsulation and concern separation? The code breaks if you run it from CLI. PHP should not copy bad ideas like this from Ruby.

comment 8y ago · link · parent

If the kernel code is vulnerable then the attacker gets full control over your system. They can also easily hide their presence. If the code is in userspace, the attacker won't even be able to read your files if you run the daemon under a separate user account. They only will be able to mine Bitcoins or use your computer as a proxy for a short time.

comment 8y ago · link · parent

What stops Microsoft from adding new settings tomorrow?

comment 8y ago · link · parent

It only can manage modern Windows versions. But you cannot use Windows to control other hosts: https://docs.ansible.com/ansible/latest/user_guide/windows_f...
1
146147148
185