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

Facebook would not be the first american company cooperating with chinese government. I remember Skype has a special version for China with censorship module built in. You can even find a list of censored words on the Internet.

Chinese government made it so that they win anyway: either Facebook cooperates or it is blocked and people use some local censored social network.

comment 10y ago · link · parent

If they don't want to pay the fees why don't they just develop some open payment protocol any bank and merchant could use? It would also solve the privacy problem with sending customer data to USA (Visa and MasterCard are both american companies).

comment 10y ago · link · parent

What if the login credentials are stolen with a keylogger, will the hackers be able to transfer the money the same way? It looks totally insecure.

And as I understand the customer cannot charge back the payment later.

> IMHO we urgently need a law that makes wire transferees instant,

Why not just use card processing systems like Visa? Are the fees too high or are there privacy concerns with sending personal data to USA?

comment 10y ago · link · parent

Is that even legal? What is the difference between this company and phishers collecting bank logins?

And doesn't it look suspicious if the logins into different accounts are made from the same IP belonging to the online shop? Some banks in my country even require SMS verification if you are logging in from new IP address.

comment 10y ago · link · parent

Google is developing software for cars so maybe soon it will be inside Ford cars too. Of course with Google Analytics preinstalled.

comment 10y ago · link · parent

I am considering this but is would take time to find and configure all necessary drivers and build the ROM.

comment 10y ago · link · parent

The market could be driving that. If you don't spy on a user then your competitor would do and get ahead of you (and get additional profit from selling the data or showing relevant advertisement).

Microsoft didn't have any telemetry in earlier days. Now they turned to a dark side.

comment 10y ago · link · parent

Even if I bought a Samsung (that is established brand, isn't it) or Apple phone I still would have to trust the manufacturer that it would not spy on me even if requested by NSA. I know that Samsung adds additional software into Android, they might have some kind of analytics too.

comment 10y ago · link · parent

I used Windows laptop with bluetooth and linux machine in VirtualBox (that also provides a virtual internal network). I physically disconnected a laptop from the Internet and used standard Windows "share Internet connection" feature to "share" virtual network via bluetooth. So Windows thought that linux VM is an Internet gateway and provided DHCP service to bluetooth network. The phone connected via bluetooth, got an IP address and all its traffic was redirected to a virtual machine by Windows. Once you get traffic to go to linux machine everything gets easy (if your host OS is linux you could skip some steps and obviously you don't need VirtualBox).

I used Wireshark on Windows to check that everythink is set up correctly and to see what kind of requests the phone makes.

You can use WiFi instead of bluetooth the same way. You only need to use "hotspot" option and provide DHCP to a phone and set your linux machine as a gateway. Probably you can do that with a router too, for example if you connect its WAN port to your linux machine or set up traffic redirection.

On linux I redirected traffic from phone to localhost with ports 53 (DNS), 80/443 (HTTP) and rejected any other traffic (there were some requests to time servers, that were sent by drm component of Android). I also ran a DNS server (dnsmasq) and Squid HTTP proxy that can process redirected traffic (Squid can also generate certificates to decrypt HTTPS traffic which was very useful though it took some time to find correct settings). I set up dnsmasq and squid to serve requests based on white and black lists.

After I did some tests I found another, easier way to capture traffic from Android phone. Android has a useful "Always-on VPN" feature that sends all traffic through specified host (and doesn't allow any network access until VPN connection is set up). You only need to set up ipsec on a linux box (I used strongswan). I used "Always-on VPN" feature to redirect traffic to my VPS while using mobile internet connection.

> Based on what you say, maybe you proxied Internet connections through Bluetooth - do you have a way to know whether there was any leakage?

I physically disconnected a laptop from the Internet and monitored the traffic on a bluetooth interface with Wireshark. The phone did not have a SIM card inside so it could not connect to a mobile network.

> For example, I've read, but can't confirm, that Android makes connections during bootup and before any firewall takes affect.

This can be detected using my setup. But if software is programmed to send some data only via mobile network and not via WiFi/bluetooth then it is more difficult to detect. You would need to set up a fake BTS (using OpenBTS for example) to capture that traffic. You would need special (not very expensive) SDR hardware in this case.

> A VPN with a firewall might be easier.

I ended up with the same idea. I even wrote a simple PHP app to manage black and white lists and view logs.

comment 10y ago · link · parent

My phone has an option to unlock a bootloader. But it would take time to find or build a custom ROM and install it and solve all kinds of problems with drivers and hardware.

And generally it is pretty decent model. It sends some data home but at least it doesn't have preinstalled adware like another chinese tablet I saw (that displays an ad over browser window and tries to disguise it as a part of a web page).

comment 10y ago · link · parent

Unlike Google (that "is not evil") Microsoft allows user to gain administrator access and install firewall on Windows.

comment 10y ago · link · parent

The phone has Google Services including Play Store (which I never used because it needs a Google Account, so I download software either from F-droid or from apkpure). But I don't know if it is licensed. It is noname chinese manufacturer that probably doesn't care much about american copyright (and GPL too because I could not find any links to linux kernel source code at their website).

> You want me to tell you why Google won't do anything, because Google doesn't give a crap about what manufacturers do as long as they keep installing Android on as many phones as possible

Google could allow controlling firewall on Android (and getting root access). The only reason they don't do it is because then users will be able to block tracking and advertisement.

comment 10y ago · link · parent

> In other words, at home you can use your own router; you can set the gateway as a computer that you control.

Yes.

> What if you had a portable gateway, one that could travel with you?

I can rent a VPS and connect through it using "Always-on VPN" option (I did it once and it worked). But then I have to pay for a server monthly in addition to the mobile plan. It is not that expensive but I would prefer just having access to iptables and being able to install my firewall on a phone.

I might be wrong but on Windows you can at least install a firewall. At least you could on earlier versions.

comment 10y ago · link · parent

And Google advertises Android as free, open source, linux-based OS. "open" is supposed to mean I can do whatever I want with it but in fact I cannot even access the iptables.

comment 10y ago · link · parent

The manufacturer's name is Shenzhen Huafurui Technology if it tells you anything. The brand name is Cubot. I do not live in US but one can buy such kind of phone on Amazon (if you search manufacturer's name there you can find it is even cheaper now).

It is good to hear that in some countries importing such phones is not allowed.

comment 10y ago · link · parent

Google could provide easy ways to control Internet traffic and to gain root access. For example, they could grant access to builtin linux iptables which doesn't cost anything to implement. And Google is easier to influence than noname chinese company.

Or they could not to sell Android license to companies not repecting consumer's privacy.

Even if I got refunded, what would I buy instead? Free market doesn't work here and all major manufacturers have some form of tracking and preinstalled software built in. It looks like the only way is to buy a backdoored proprietary device and replace a ROM (and then solve all kinds of problems with hardware not working properly or battery getting drained).

comment 10y ago · link · parent

I am not a lawyer. Ususally consumer protection laws protect only from not providing advertised features. There might be something related to privacy laws but I am not sure how they work internationally.

comment 10y ago · link · parent

I have a chinese Android phone. Instead of connecting it to the Internet I connected it to my computer over bluetooth and started monitoring the traffic it tried to send. There were attempts to connect to Google servers and chinese manufacturer's servers. The data sent to China was supposed to contain sensitive information like phone number or SIM card identifier.

It also has an auto-update (read: backdoor) feature that cannot be disabled.

I ended up making a linux-based whitelist firewall to access the Internet but it is pretty inconvinient because I have to manually enable every new host. And I can use it only at home.

As a consumer I am very disappointed and feel being deceived by Google. I know about "you are the product" saying but the smartphone is not free. I bought an expensive (two hundred dollars!) device and I had to spend a lot of my time to be able to control its activity. And of course the advertisement never mentioned that a smartphone is going to spy on me.

We need a law against this.

comment 10y ago · link · parent

I have a feeling that with Chrome any environment gets memory-constrained pretty fast. I have 3 (three) gigabytes of RAM (that can hold over 3 billion bytes inside) available to OS, is that not enough?

comment 10y ago · link · parent

Requiring JS support to display a list of links is like requiring a user to download an application to view the site. No sane person would do this, right? Oh wait...

comment 10y ago · link · parent

You are right. There are web applications (like Google Docs) and simple collections of web pages (a typical Wordpress blog). I am not against JS or SPA architecture generally but I am against using complicated solutions for simple problems. Using rich frontend application to display just a list of links is obviously over-engineering.

comment 10y ago · link · parent

Pages load faster with JS disabled, show less advertisement and no popups. Browser processes take less memory. Social network tracking scripts (usually disguised as share buttons) do not work. Annoying fixed headers, footers and sidebar usually don't work without JS too.

I got used to this comfortable way of browsing the web and seeing more sites that don't work without JS doesn't make me happy.

comment 10y ago · link · parent

In future publishers will probably use web assembly for DRM, for example, to render decrypted article text on a canvas so that it cannot be copied, zoomed, read aloud or viewed without advertisement and annoying popups. Maybe you will change your mind about Javascript then.

comment 10y ago · link · parent

I looked at Ember documentation and saw a tutorial on building a rental site [1] that could be easily implemented without Ember. They should have chosen a better example that would show clear benefints from using complicated JS framework otherwise it just looks like over-engineered solution for a simple problem.

Also Ember documentation doesn't give any reasoning why (or when) one should or should not use their framework. But they have a mustache on a front page.

[1] https://guides.emberjs.com/v2.9.0/tutorial/ember-cli/

comment 10y ago · link · parent

I can bet uncompressed 10 Kb HTML file still would load faster.

comment 10y ago · link · parent

Storing and processing data locally in a user's browser without using server API actually can be a valid reason to build a client-side application. But they just use one megabyte of JS code to implement client-side rendering for JSON data received from API. Serving a 10 Kb HTML page is obviously a better solution. I see no single benefit from using complicated JS framework here.

comment 10y ago · link · parent

Answering the question in the title: no, probably you don't.

Many developers today do not understand what a SPA is and when one should choose this architecture. Writing a client side and a server side code is more complicated task that writing just a server side code so it should be justified.

Client side code is necessary when building interactive applications like spreadsheet or when an application has to work offline or store data locally. When a website feels more like a desktop application than a plain web page. There should be reasons to complicate architecture.

Most of a web sites are just a collection of pages, not applications. Using SPA there gives no advantages. For examples, developers of this website [1] used a megabyte of Javascript and API to display a list of 10 links. I do not see a single benefit from using SPA here over serving a 5Kb HTML file with those links. Everything just got worse.

And it looks like some JS frameworks authors do not understand it too. For example, I looked at Ember documentation and saw a tutorial [2] on building a rental site. Using Ember there gives no advantages over good old server-side generated pages (optionally using github-style AJAX page reloading). This over-engineered approach just makes a website load slower, comsume more CPU and memory resources, increases complexity, complicates deployment. If they are presenting Ember as a tool to build applications they should provide an example of application, not a plain old HTML 1.0 website.

[1] https://whosfiring.com/

[2] https://guides.emberjs.com/v2.9.0/tutorial/ember-cli/

comment 10y ago · link · parent

Sorry, but I am going to comment on a technical implementation rather than the content of a site.

The site shows blank page without JS enabled. I did not understand why one would need one megabyte of minified Javascript to display a list of 10 items. Probably it is because the developers were too busy learning trendy JS frameworks and do not know about HTML and server side page generation (in PHP this could be done much easier without JS frameworks and API).

And to make page load even slower after loading a megabyte of Javascript they make an additional API request to load a list of links. Hey, you could just send this list as a HTML file from the start.

Also it looks like they do not know about HTML <script> tags and encode configuration as a value of a <meta> tag.

The page has small white padding below footer.

comment 10y ago · link · parent

If we could use a different identifier (like email address) for every website such hack would not be a problem. Or if we used a hardware key without email address.

comment 10y ago · link · parent

He is absolutely right. It seems that in America personal data are not properly protected and corporations can do whatever they want.

And making people work long hours is bad too. Isn't sleepy driver dangerous for everyone?

1
176177178
185