In a recent work [Schneider et al., Proc. Natl. Acad. Sci. USA 108, 3838 (2011)], the authors proposed a simple measure for network robustness under malicious attacks on nodes. Using a greedy algorithm, they found that the optimal structure with respect to this quantity is an onion structure in which high-degree nodes form a core surrounded by rings of nodes with decreasing degree. However, in real networks the failure can also occur in links such as dysfunctional power cables and blocked airlines. Accordingly, complementary to the node-robustness measurement (R(n)), we propose a link-robustness index (R(l)). We show that solely enhancing R(n) cannot guarantee the improvement of R(l). Moreover, the structure of an R(l)-optimized network is found to be entirely different from that of an onion network. In order to design robust networks that are resistant to a more realistic attack condition, we propose a hybrid greedy algorithm that takes both the R(n) and R(l) into account. We validate the robustness of our generated networks against malicious attacks mixed with both nodes and links failure. Finally, some economical constraints for swapping the links in real networks are considered, and significant improvement in both aspects of robustness is still achieved.