{"id":354,"date":"2020-03-01T00:49:32","date_gmt":"2020-02-29T16:49:32","guid":{"rendered":"http:\/\/1989lifejourney.com\/?p=354"},"modified":"2020-03-01T13:45:24","modified_gmt":"2020-03-01T05:45:24","slug":"create-a-proxy-server-on-amazon-ec2","status":"publish","type":"post","link":"https:\/\/1989lifejourney.com\/?p=354","title":{"rendered":"Create a proxy server on Amazon EC2"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Run a Proxy on Amazon EC2 VPC<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1: \u5148\u53bbAmazon\u5b98\u7db2\u5efa\u7acb\u81ea\u5df1\u7684EC2 instance<br>Step 2: \u5229\u7528AWS key,\u8b93\u81ea\u5df1\u7684\u96fb\u8166\u9023\u4e0aEC2 instance<br>Step 3: \u9023\u4e0a\u4e4b\u5f8c,\u5728EC2 instance\u4e0a\u5b89\u88ddproxy server\u8edf\u9ad4<br>Step 4: \u7de8\u8f2fproxy server\u8edf\u9ad4\u7684config\u6a94,\u6307\u5b9a\u8981\u4f7f\u7528\u7684port\u548c\u5141\u8a31\u9023\u7dda\u7684IP address<br>Step 5: Redirect localhost with specified port to EC2 instance IP address and proxy port<br>Step 6: Open your computer network setting page to configure proxy ip address and port<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<br>1) We use Squid as our proxy server on Ubuntu 18.04.3 LTS (GNU\/Linux 4.15.0-1057-aws x86_64)<br>2) After connecting to your instance, you can use following commands to set up Squid:<br><\/strong>sudo apt update<br>sudo apt install squid<br>cd etc\/squid<br>sudo su<br>vi squid.conf \/\/ to allow specified ip address connection<br>sudo service squid restart \/\/ Restart Squid service to reload the configuration changes<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ref: <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1) <a href=\"https:\/\/www.youtube.com\/watch?v=FCEHqB3wTcQ&amp;list=PLIuJKXXSwZ8C4UyUNzfFRvLayI5YQyoGf&amp;index=7&amp;t=0s\">https:\/\/www.youtube.com\/watch?v=FCEHqB3wTcQ&amp;list=PLIuJKXXSwZ8C4UyUNzfFRvLayI5YQyoGf&amp;index=7&amp;t=0s<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2)<a href=\"https:\/\/gist.github.com\/webinista\/812c20247a6c21e639ce\">https:\/\/gist.github.com\/webinista\/812c20247a6c21e639ce<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other ref:<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Unable to locate package\u201d Error on Ubuntu:<br><a href=\"https:\/\/itsfoss.com\/unable-to-locate-package-error-ubuntu\/\">https:\/\/itsfoss.com\/unable-to-locate-package-error-ubuntu\/<\/a><\/li><li>How to Setup Squid Proxy Server on Ubuntu 18.04 &amp; 16.04:<br><a href=\"https:\/\/tecadmin.net\/setup-squid-proxy-server-on-ubuntu\/\">https:\/\/tecadmin.net\/setup-squid-proxy-server-on-ubuntu\/<\/a><\/li><li>Squid &#8211; Proxy Server installation &amp; config:<br><a href=\"https:\/\/help.ubuntu.com\/lts\/serverguide\/squid.html\">https:\/\/help.ubuntu.com\/lts\/serverguide\/squid.html<\/a><\/li><li>Find or Search a Word in Vim or Vi Text Editor:<br><a href=\"https:\/\/linux4one.com\/how-to-find-or-search-a-word-in-vim-or-vi-text-editor\/\">https:\/\/linux4one.com\/how-to-find-or-search-a-word-in-vim-or-vi-text-editor\/<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Run a Proxy on Amazon EC2 VPC Step 1: \u5148\u53bbAmazon\u5b98\u7db2\u5efa\u7acb\u81ea\u5df1\u7684EC [&hellip;]<\/p>\n","protected":false},"author":139426785,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_postgate_lock_override":"inherit","_postgate_lock_mode":"inherit","_postgate_preview_mode":"inherit","_postgate_preview_limit":0,"_postgate_product_ids":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","jetpack_seo_llms_txt_always_include":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[55138170],"tags":[],"post_folder":[],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-technology-sharing"],"jetpack_publicize_connections":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paR5vw-5I","jetpack-related-posts":[{"id":276,"url":"https:\/\/1989lifejourney.com\/?p=276","url_meta":{"origin":354,"position":0},"title":"AVFoundation Programming Guide &#8211; Swift &#8211; Using Assets","author":"Kevin","date":"25 12 \u6708, 2019","format":false,"excerpt":"Using Assets Assets can come from a file or from m\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7878,"url":"https:\/\/1989lifejourney.com\/?p=7878","url_meta":{"origin":354,"position":1},"title":"ChatGPT\u6e2c\u8a66_23 (Write the comment which style is Apple&#8217;s documentation comment style)","author":"Kevin","date":"12 4 \u6708, 2023","format":false,"excerpt":"\u554f\u984c: Write the comment for below Swift functions wh\u2026","rel":"","context":"\u5728\u300cChatGPT\u300d\u4e2d","block_context":{"text":"ChatGPT","link":"https:\/\/1989lifejourney.com\/?cat=760577830"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5853,"url":"https:\/\/1989lifejourney.com\/?p=5853","url_meta":{"origin":354,"position":2},"title":"IOS debug &#8211; get memory address","author":"Kevin","date":"1 9 \u6708, 2022","format":false,"excerpt":"https:\/\/gist.github.com\/tgnivekucn\/225ec01a0660364\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2022\/09\/img_3779.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2022\/09\/img_3779.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2022\/09\/img_3779.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2022\/09\/img_3779.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2022\/09\/img_3779.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":4982,"url":"https:\/\/1989lifejourney.com\/?p=4982","url_meta":{"origin":354,"position":3},"title":"Difference between value type and a reference type in iOS swift\ufffc","author":"Kevin","date":"29 3 \u6708, 2022","format":false,"excerpt":"\u4ee5\u4e0b\u8cc7\u6599\u7686\u53c3\u8003\u81eaRef1\uff0c\u9019\u88e1\u50c5\u4f5c\u500b\u4eba\u5b78\u7fd2\u6574\u7406: Definition of Value type \u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4037,"url":"https:\/\/1989lifejourney.com\/?p=4037","url_meta":{"origin":354,"position":4},"title":"Bluetooth Communication(IOS Core Bluetooth)","author":"Kevin","date":"8 1 \u6708, 2022","format":false,"excerpt":"IOS Core Bluetooth\u662fbased on BLE(Bluetooth low ener\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4009,"url":"https:\/\/1989lifejourney.com\/?p=4009","url_meta":{"origin":354,"position":5},"title":"Static vs Dynamic Dispatch in Swift","author":"Kevin","date":"6 1 \u6708, 2022","format":false,"excerpt":"\u4ee5\u4e0b\u5167\u5bb9\u53c3\u8003\u81ea[Ref]\uff0c\u9019\u88e1\u50c5\u4f5c\u500b\u4eba\u6458\u8981\u6574\u7406: Method Dispatch\u5b9a\u7fa9: Method\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/users\/139426785"}],"replies":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354"}],"version-history":[{"count":6,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/354\/revisions"}],"predecessor-version":[{"id":360,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/354\/revisions\/360"}],"wp:attachment":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fpost_folder&post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}