The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

120 line
2.8 KiB

  1. #
  2. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  3. #
  4. - name: Install python3, pip, virtualenv and required dependencies
  5. apt:
  6. name: [ 'python3-pip', 'python3-venv', 'libc6-dev', 'libpython3-dev', 'g++', 'libffi-dev' ]
  7. state: present
  8. update_cache: yes
  9. - name: Install supervisor conf file
  10. template:
  11. src: supervisor_mitmproxy.conf.j2
  12. dest: /etc/supervisor/conf.d/mitmproxy.conf
  13. owner: root
  14. group: root
  15. mode: 0400
  16. - name: Create mitmproxy user
  17. user:
  18. name: mitmproxy
  19. comment: mitmdump user
  20. shell: /bin/bash
  21. system: yes
  22. home: /home/mitmproxy
  23. - name: Creates mitmproxy dir
  24. file:
  25. path: /home/mitmproxy/mitmproxy
  26. owner: mitmproxy
  27. group: mitmproxy
  28. mode: 0755
  29. state: directory
  30. - name: Unzip mitmproxy.zip
  31. unarchive:
  32. src: mitmproxy.zip
  33. dest: /home/mitmproxy/mitmproxy
  34. - name: Copy mitmdump files
  35. copy:
  36. src: "{{ item }}"
  37. dest: "/home/mitmproxy/mitmproxy/{{ item }}"
  38. owner: mitmproxy
  39. group: mitmproxy
  40. mode: 0500
  41. with_items:
  42. - bubble_api.py
  43. - dns_spoofing.py
  44. - bubble_passthru.py
  45. - bubble_modify.py
  46. - run_mitmdump.sh
  47. - name: Install cert helper scripts
  48. copy:
  49. src: "{{ item }}"
  50. dest: "/usr/local/bin/{{ item }}"
  51. owner: root
  52. group: root
  53. mode: 0500
  54. with_items:
  55. - install_cert.sh
  56. - set_cert_name.sh
  57. - reuse_bubble_mitm_certs.sh
  58. - name: Set the cert name
  59. shell: set_cert_name.sh /home/mitmproxy/mitmproxy {{ server_alias }}
  60. - name: Set ownership of mitmproxy files
  61. shell: chown -R mitmproxy /home/mitmproxy/mitmproxy
  62. - name: Reuse bubble mitm certs if available
  63. shell: reuse_bubble_mitm_certs.sh
  64. - name: Copy bubble_config.py to /home/mitmproxy/mitmproxy
  65. template:
  66. src: bubble_config.py.j2
  67. dest: /home/mitmproxy/mitmproxy/bubble_config.py
  68. owner: mitmproxy
  69. group: mitmproxy
  70. mode: 0500
  71. - name: Fix missing symlink for libstdc++
  72. file:
  73. src: /usr/lib/x86_64-linux-gnu/libstdc++.so.6
  74. dest: /usr/lib/x86_64-linux-gnu/libstdc++.so
  75. owner: root
  76. group: root
  77. state: link
  78. - name: Restart dnscrypt-proxy
  79. service:
  80. name: dnscrypt-proxy
  81. state: restarted
  82. tags: algo_related
  83. - name: restart supervisord
  84. service:
  85. name: supervisor
  86. enabled: yes
  87. state: restarted
  88. tags: always
  89. - import_tasks: route.yml
  90. - name: Install mitmdump_monitor
  91. copy:
  92. src: "mitmdump_monitor.sh"
  93. dest: "/usr/local/sbin/mitmdump_monitor.sh"
  94. owner: root
  95. group: root
  96. mode: 0500
  97. - name: Install mitmdump_monitor supervisor conf file
  98. copy:
  99. src: supervisor_mitmdump_monitor.conf
  100. dest: /etc/supervisor/conf.d/mitmdump_monitor.conf
  101. - name: Ensure mitmdump_monitor is started
  102. shell: supervisorctl restart mitmdump_monitor