{"id":13558541,"url":"https://github.com/sskaje/6in4","last_synced_at":"2025-03-23T17:31:43.667Z","repository":{"id":61333285,"uuid":"50285227","full_name":"sskaje/6in4","owner":"sskaje","description":"IPv6-in-IPv4 Tunnel Server ","archived":false,"fork":false,"pushed_at":"2019-02-12T08:11:33.000Z","size":7,"stargazers_count":177,"open_issues_count":2,"forks_count":35,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-04T09:37:24.807Z","etag":null,"topics":["6in4","6to4","ipv4","ipv6","tunnel"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sskaje.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-24T11:47:12.000Z","updated_at":"2024-10-22T13:46:23.000Z","dependencies_parsed_at":"2022-10-15T05:41:05.181Z","dependency_job_id":null,"html_url":"https://github.com/sskaje/6in4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sskaje%2F6in4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sskaje%2F6in4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sskaje%2F6in4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sskaje%2F6in4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sskaje","download_url":"https://codeload.github.com/sskaje/6in4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245141156,"owners_count":20567525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["6in4","6to4","ipv4","ipv6","tunnel"],"created_at":"2024-08-01T12:05:00.864Z","updated_at":"2025-03-23T17:31:43.639Z","avatar_url":"https://github.com/sskaje.png","language":"Shell","funding_links":[],"categories":["Shell","others","\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"9d6789f22a280f5bb6491d1353b02384\"\u003e\u003c/a\u003e隧道\u0026\u0026穿透"],"readme":"# IPv6-in-IPv4 Tunnel \n\nAuthor: sskaje ([http://sskaje.me/](http://sskaje.me/))\n\nYou can set up your own tunnelbroker.net!\n\n\nMore to read: ([http://sskaje.me/2016/01/be-your-own-tunnelbroker-net-iproute2/](http://sskaje.me/2016/01/be-your-own-tunnelbroker-net-iproute2/))\n\n## Commands\n### Add\nCreate a new tunnel, tunnel_id=1, remote ip 211.100.11.11\n\n```\n./bin/6to4 add 1 211.100.11.11\n```\n\n### Update\nChange remote ip to 211.100.11.12 for tunnel_id=1 \n\n```\n./bin/6to4 update 1 211.100.11.12\n```\n\n### Delete\nDelete tunnel tunnel_id=1\n\n```\n./bin/6to4 del 1\n```\n\n\n## Config\n\nConfig file locates at **etc/config.ini**\n\nCase: `You have 2400:1234:1234:1200::/56 routed to your VPS, eth0 is your internet network device.`\n\n### IPV6_NETWORK\nIPv6 network , must be ending with '::'\n\n### IPV6_CIDR\n\nIPV6 CIDR, must be a multiple of 8, accepted CIDR: 8,16,24,32,40,48,56,64,72,80,88,96.\n\nIf your IPV6_CIDR is smaller than /64, assigned blocks are /64; if smaller than /48, /48 is used.\n\nIf IPV6_CIDR is greater than /64, assigned blocks are /(IPV6_CIDR + 16 [ + 8 ]), e.g.: 64-\u003e80, 72-\u003e96, 80-\u003e96\n\n\n### INTERFACE\nBind tunnel to device INTERFACE\n\n### BIND_IP\nBind a specific IP from $INTERFACE, this is optional, if it's not set, script reads first IP from $INTERFACE\n\n\n### LINK_MTU\nMTU, default to 1480\n\n\n\n## Settings for http API\n\n### Add following to /etc/sudoers\n\n```\nphp-user ALL=(ALL) NOPASSWD: /path/to/v6/bin/6to4\n```\n\n### Add following to nginx vhost \n\n```\nrewrite ^/v6/(.+)$ /v6/cgi/$1 break;\nlocation ~ ^/v6 {\n    auth_basic \"Username: tunnel id; Password: Secret.\";\n    auth_basic_user_file $document_root/v6/etc/htpasswd;\n\n    fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n\n    fastcgi_pass unix:/var/run/php5-fpm.sock;\n    fastcgi_index index.php;\n    include fastcgi.conf;\n}\n\n```\n\n### Add user for tunnel id 0\n```\nhtpasswd etc/htpasswd 0\n```\n\n## Client Settings\n\n### Clients configuration on Debian\n```\nauto ss-ipv6\niface ss-ipv6 inet6 v4tunnel\n        address 'Client IPv6 Address'\n        netmask 80\n        gateway 'Server IPv6 Address'\n        endpoint 'Server IPv4 Address'\n        local 0.0.0.0\n        ttl 255\n\n```\n### Update EndPoint IP\n\n\n```\ncurl --silent --user 'TUNNEL_ID:PASSWORD' http://your.v6.api.domain/v6/update.php\n```\nYou can also add this to your **crontab** or somewhere like **/etc/network/if-up.d/**\n\n\n## EOF\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsskaje%2F6in4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsskaje%2F6in4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsskaje%2F6in4/lists"}